Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 19 Oct 2021 23:21:52 +0800
From: butt3rflyh4ck <>
Subject: Linux kernel: isdn: cpai: array-index-out-of-bounds in
 detach_capi_ctr in drivers/isdn/capi/kcapi.c

Hi, there is an array-index-out-bounds bug in detach_capi_ctr in
drivers/isdn/capi/kcapi.c and I reproduce it on 5.15.0-rc2+.

#Root Cause
we can call CMTPCONNADD ioctl and it would invoke
do_cmtp_sock_ioctl(), it would call cmtp_add_connection().
The chain of call is as follows.
the function would add a cmtp session to a controller.

The cmtp_add_connection() would add a cmtp session to a controller
and run a kernel thread to process cmtp.

        session->task = kthread_run(cmtp_session, session, "kcmtpd_ctr_%d",

During this process, the kernel thread would call detach_capi_ctr()
to detach a register controller. if the controller
was not attached yet, detach_capi_ctr() would
trigger an array-index-out-bounds bug.


The patch is available upstream now.

*2021/9/24 - Vulnerability reported to
*2021/9/24 - Vulnerability confirmed.
*2021/10/8 - Vulnerability patched.
*2021/10/9 - Vulnerability reported to and confirmed
*2021/10/19 - Opened on

Active Defense Lab of Venustech.


Active Defense Lab of Venustech

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.