Updated:
Description:
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: l2cap: fix null-ptr-deref in l2cap_chan_timeout There is a race condition between l2cap_chan_timeout() and l2cap_chan_del(). When we use l2cap_chan_del() to delete the channel, the chan->conn will be set to null. But the conn could be dereferenced again in the mutex_lock() of l2cap_chan_timeout(). As a result the null pointer dereference bug will happen. The KASAN report triggered by POC is shown below: [ 472.074580] ================================================================== [ 472.075284] BUG: KASAN: null-ptr-deref in mutex_lock+0x68/0xc0 [ 472.075308] Write of size 8 at addr 0000000000000158 by task kworker/0:0/7 [ 472.075308] [ 472.075308] CPU: 0 PID: 7 Comm: kworker/0:0 Not tainted 6.9.0-rc5-00356-g78c0094a146b #36 [ 472.075308] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu4 [ 472.075308] Workqueue: events l2cap_chan_timeout [ 472.075308] Call Trace: [ 472.075308] <TASK> [ 472.075308] dump_stack_lvl+0x137/0x1a0 [ 472.075308] print_report+0x101/0x250 [ 472.075308] ? __virt_addr_valid+0x77/0x160 [ 472.075308] ? mutex_lock+0x68/0xc0 [ 472.075308] kasan_report+0x139/0x170 [ 472.075308] ? mutex_lock+0x68/0xc0 [ 472.075308] kasan_check_range+0x2c3/0x2e0 [ 472.075308] mutex_lock+0x68/0xc0 [ 472.075308] l2cap_chan_timeout+0x181/0x300 [ 472.075308] process_one_work+0x5d2/0xe00 [ 472.075308] worker_thread+0xe1d/0x1660 [ 472.075308] ? pr_cont_work+0x5e0/0x5e0 [ 472.075308] kthread+0x2b7/0x350 [ 472.075308] ? pr_cont_work+0x5e0/0x5e0 [ 472.075308] ? kthread_blkcg+0xd0/0xd0 [ 472.075308] ret_from_fork+0x4d/0x80 [ 472.075308] ? kthread_blkcg+0xd0/0xd0 [ 472.075308] ret_from_fork_asm+0x11/0x20 [ 472.075308] </TASK> [ 472.075308] ================================================================== [ 472.094860] Disabling lock debugging due to kernel taint [ 472.096136] BUG: kernel NULL pointer dereference, address: 0000000000000158 [ 472.096136] #PF: supervisor write access in kernel mode [ 472.096136] #PF: error_code(0x0002) - not-present page [ 472.096136] PGD 0 P4D 0 [ 472.096136] Oops: 0002 [#1] PREEMPT SMP KASAN NOPTI [ 472.096136] CPU: 0 PID: 7 Comm: kworker/0:0 Tainted: G B 6.9.0-rc5-00356-g78c0094a146b #36 [ 472.096136] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu4 [ 472.096136] Workqueue: events l2cap_chan_timeout [ 472.096136] RIP: 0010:mutex_lock+0x88/0xc0 [ 472.096136] Code: be 08 00 00 00 e8 f8 23 1f fd 4c 89 f7 be 08 00 00 00 e8 eb 23 1f fd 42 80 3c 23 00 74 08 48 88 [ 472.096136] RSP: 0018:ffff88800744fc78 EFLAGS: 00000246 [ 472.096136] RAX: 0000000000000000 RBX: 1ffff11000e89f8f RCX: ffffffff8457c865 [ 472.096136] RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff88800744fc78 [ 472.096136] RBP: 0000000000000158 R08: ffff88800744fc7f R09: 1ffff11000e89f8f [ 472.096136] R10: dffffc0000000000 R11: ffffed1000e89f90 R12: dffffc0000000000 [ 472.096136] R13: 0000000000000158 R14: ffff88800744fc78 R15: ffff888007405a00 [ 472.096136] FS: 0000000000000000(0000) GS:ffff88806d200000(0000) knlGS:0000000000000000 [ 472.096136] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 472.096136] CR2: 0000000000000158 CR3: 000000000da32000 CR4: 00000000000006f0 [ 472.096136] Call Trace: [ 472.096136] <TASK> [ 472.096136] ? __die_body+0x8d/0xe0 [ 472.096136] ? page_fault_oops+0x6b8/0x9a0 [ 472.096136] ? kernelmode_fixup_or_oops+0x20c/0x2a0 [ 472.096136] ? do_user_addr_fault+0x1027/0x1340 [ 472.096136] ? _printk+0x7a/0xa0 [ 472.096136] ? mutex_lock+0x68/0xc0 [ 472.096136] ? add_taint+0x42/0xd0 [ 472.096136] ? exc_page_fault+0x6a/0x1b0 [ 472.096136] ? asm_exc_page_fault+0x26/0x30 [ 472.096136] ? mutex_lock+0x75/0xc0 [ 472.096136] ? mutex_lock+0x88/0xc0 [ 472.096136] ? mutex_lock+0x75/0xc0 [ 472.096136] l2cap_chan_timeo ---truncated---
CVSS3: 5.5
OS | Vendor version | Errata |
---|---|---|
RHEL 8 | 4.18.0-553.30.1.el8_10 | RHSA-2024:10281 |
Ubuntu 20.04 | 5.4.0-192.212 | USN-6951-1 |
Ubuntu 20.04 AWS | 5.4.0-1130.140 | USN-6951-1 |
Debian 11 | 5.10.218-1 | DSA-5703-1 |
Ubuntu 22.04 | 5.15.0-118.128 | USN-6950-1 |
Ubuntu 22.04 AWS | 5.15.0-1067.73 | USN-6950-1 |
Ubuntu 22.04 Azure | 5.15.0-1070.79 | USN-6956-1 |
Debian 11 cloud | 5.10.218-1 | DSA-5703-1 |
Ubuntu 20.04 HWE AWS | 5.15.0-1067.73~20.04.1 | USN-6950-2 |
Ubuntu 20.04 HWE Azure | 5.15.0-1070.79~20.04.1 | USN-6956-1 |
Ubuntu 20.04 GCP | 5.4.0-1134.143 | USN-6951-1 |
Ubuntu 24.04 | 6.8.0-40.40 | USN-6949-1 |
OS | Original kernel version | State |
---|---|---|
RHEL 8 | |
In Progress |
Ubuntu 20.04 | |
In Progress |
Ubuntu 20.04 AWS | |
In Progress |
Debian 11 |
5.10.46-5
show all
hide all
5.10.70-1
5.10.46-4
5.10.84-1
5.10.92-1
5.10.92-2
5.10.103-1
5.10.106-1
5.10.113-1
5.10.120-1
5.10.127-1
5.10.127-2
5.10.136-1
5.10.140-1
5.10.149-1
5.10.149-2
5.10.158-2
5.10.162-1
5.10.179-1
5.10.179-2
5.10.179-3
5.10.179-5
5.10.191-1
5.10.197-1
5.10.178-3
5.10.205-2
5.10.205-1
5.10.209-2
5.10.216-1
|
Released |
Ubuntu 22.04 |
5.15.0-27.28
show all
hide all
5.15.0-33.34
5.15.0-37.39
5.15.0-39.42
5.15.0-25.25
5.15.0-28.29
5.15.0-29.30
5.15.0-30.31
5.15.0-41.44
5.15.0-43.46
5.15.0-46.49
5.15.0-35.36
5.15.0-47.51
5.15.0-48.54
5.15.0-40.43
5.15.0-50.56
5.15.0-52.58
5.15.0-53.59
5.15.0-56.62
5.15.0-54.60
5.15.0-57.63
5.15.0-58.64
5.15.0-60.66
5.15.0-67.74
5.15.0-69.76
5.15.0-70.77
5.15.0-71.78
5.15.0-72.79
5.15.0-68.75
5.15.0-73.80
5.15.0-75.82
5.15.0-76.83
5.15.0-78.85
5.15.0-79.86
5.15.0-82.91
5.15.0-83.92
5.15.0-84.93
5.15.0-86.96
5.15.0-74.81
5.15.0-87.97
5.15.0-88.98
5.15.0-89.99
5.15.0-91.101
5.15.0-92.102
5.15.0-94.104
5.15.0-97.107
5.15.0-100.110
5.15.0-101.111
5.15.0-102.112
5.15.0-105.115
5.15.0-106.116
5.15.0-107.117
5.15.0-112.122
5.15.0-113.123
5.15.0-116.126
5.15.0-117.127
|
Released |
Ubuntu 22.04 AWS |
5.15.0-1005.7
show all
hide all
5.15.0-1008.10
5.15.0-1011.14
5.15.0-1013.17
5.15.0-1015.19
5.15.0-1017.21
5.15.0-1009.11
5.15.0-1020.24
5.15.0-1021.25
5.15.0-1022.26
5.15.0-1023.27
5.15.0-1026.30
5.15.0-1004.6
5.15.0-1014.18
5.15.0-1018.22
5.15.0-1024.29
5.15.0-1027.31
5.15.0-1028.32
5.15.0-1030.34
5.15.0-1031.35
5.15.0-1033.37
5.15.0-1034.38
5.15.0-1035.39
5.15.0-1036.40
5.15.0-1032.36
5.15.0-1037.41
5.15.0-1038.43
5.15.0-1039.44
5.15.0-1040.45
5.15.0-1042.47
5.15.0-1043.48
5.15.0-1044.49
5.15.0-1045.50
5.15.0-1047.52
5.15.0-1048.53
5.15.0-1049.54
5.15.0-1050.55
5.15.0-1051.56
5.15.0-1052.57
5.15.0-1053.58
5.15.0-1055.60
5.15.0-1056.61
5.15.0-1057.63
5.15.0-1060.66
5.15.0-1061.67
5.15.0-1062.68
5.15.0-1063.69
5.15.0-1064.70
5.15.0-1065.71
5.15.0-1066.72
|
Released |
Ubuntu 22.04 Azure |
5.15.0-1005.6
show all
hide all
5.15.0-1007.8
5.15.0-1010.12
5.15.0-1012.15
5.15.0-1014.17
5.15.0-1017.20
5.15.0-1008.9
5.15.0-1019.24
5.15.0-1020.25
5.15.0-1021.26
5.15.0-1022.27
5.15.0-1003.4
5.15.0-1013.16
5.15.0-1023.29
5.15.0-1029.36
5.15.0-1024.30
5.15.0-1034.41
5.15.0-1035.42
5.15.0-1036.43
5.15.0-1037.44
5.15.0-1038.45
5.15.0-1039.46
5.15.0-1040.47
5.15.0-1041.48
5.15.0-1042.49
5.15.0-1045.52
5.15.0-1046.53
5.15.0-1047.54
5.15.0-1049.56
5.15.0-1044.51
5.15.0-1050.57
5.15.0-1051.59
5.15.0-1052.60
5.15.0-1053.61
5.15.0-1054.62
5.15.0-1056.64
5.15.0-1057.65
5.15.0-1058.66
5.15.0-1059.67
5.15.0-1060.69
5.15.0-1061.70
5.15.0-1063.72
5.15.0-1064.73
5.15.0-1066.75
5.15.0-1067.76
5.15.0-1068.77
|
Released |
Debian 11 cloud |
5.10.113-1
show all
hide all
5.10.179-2
5.10.179-3
5.10.179-5
5.10.191-1
5.10.197-1
5.10.205-2
5.10.209-2
5.10.216-1
|
Released |
Ubuntu 20.04 HWE AWS |
5.15.0-1026.30~20.04.2
show all
hide all
5.15.0-1022.26~20.04.1
5.15.0-1023.27~20.04.1
5.15.0-1021.25~20.04.1
5.15.0-1020.24~20.04.1
5.15.0-1017.21~20.04.1
5.15.0-1019.23~20.04.1
5.15.0-1014.18~20.04.1
5.15.0-1015.19~20.04.1
5.15.0-1018.22~20.04.1
5.15.0-1027.31~20.04.1
5.15.0-1028.32~20.04.1
5.15.0-1030.34~20.04.1
5.15.0-1031.35~20.04.1
5.15.0-1033.37~20.04.1
5.15.0-1034.38~20.04.1
5.15.0-1035.39~20.04.1
5.15.0-1036.40~20.04.1
5.15.0-1037.41~20.04.1
5.15.0-1038.43~20.04.1
5.15.0-1039.44~20.04.1
5.15.0-1040.45~20.04.1
5.15.0-1041.46~20.04.1
5.15.0-1043.48~20.04.1
5.15.0-1044.49~20.04.1
5.15.0-1045.50~20.04.1
5.15.0-1047.52~20.04.1
5.15.0-1048.53~20.04.1
5.15.0-1049.54~20.04.1
5.15.0-1050.55~20.04.1
5.15.0-1051.56~20.04.1
5.15.0-1052.57~20.04.1
5.15.0-1053.58~20.04.1
5.15.0-1055.60~20.04.1
5.15.0-1056.61~20.04.1
5.15.0-1057.63~20.04.1
5.15.0-1058.64~20.04.1
5.15.0-1061.67~20.04.1
5.15.0-1062.68~20.04.1
5.15.0-1063.69~20.04.1
5.15.0-1064.70~20.04.1
5.15.0-1065.71~20.04.1
5.15.0-1066.72~20.04.1
|
Released |
Ubuntu 20.04 HWE Azure |
5.15.0-1029.36~20.04.1
show all
hide all
5.15.0-1022.27~20.04.1
5.15.0-1023.29~20.04.1
5.15.0-1021.26~20.04.1
5.15.0-1020.25~20.04.1
5.15.0-1017.20~20.04.1
5.15.0-1019.24~20.04.1
5.15.0-1008.9~20.04.1
5.15.0-1013.16~20.04.1
5.15.0-1014.17~20.04.1
5.15.0-1024.30~20.04.1
5.15.0-1034.41~20.04.1
5.15.0-1049.56~20.04.1
5.15.0-1050.57~20.04.1
5.15.0-1054.62~20.04.1
5.15.0-1056.64~20.04.1
5.15.0-1057.65~20.04.1
5.15.0-1058.66~20.04.2
5.15.0-1059.67~20.04.1
5.15.0-1060.69~20.04.1
5.15.0-1061.70~20.04.1
5.15.0-1063.72~20.04.1
5.15.0-1064.73~20.04.1
5.15.0-1067.76~20.04.1
5.15.0-1068.77~20.04.1
5.15.0-1065.74~20.04.1
|
Released |
Ubuntu 20.04 GCP | |
In Progress |
Debian 12 | |
Planned |
Ubuntu 24.04 | |
Planned |