CVE-2025-38117

Source
https://cve.org/CVERecord?id=CVE-2025-38117
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38117.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38117
Downstream
Related
Published
2025-07-03T08:35:25.060Z
Modified
2026-03-20T12:42:40.801633Z
Summary
Bluetooth: MGMT: Protect mgmt_pending list with its own lock
Details

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: MGMT: Protect mgmt_pending list with its own lock

This uses a mutex to protect from concurrent access of mgmt_pending list which can cause crashes like:

================================================================== BUG: KASAN: slab-use-after-free in hcisockgetchannel+0x60/0x68 net/bluetooth/hcisock.c:91 Read of size 2 at addr ffff0000c48885b2 by task syz.4.334/7318

CPU: 0 UID: 0 PID: 7318 Comm: syz.4.334 Not tainted 6.15.0-rc7-syzkaller-g187899f4124a #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dumpstack+0x30/0x40 lib/dumpstack.c:94 dumpstacklvl+0xd8/0x12c lib/dumpstack.c:120 printaddressdescription+0xa8/0x254 mm/kasan/report.c:408 printreport+0x68/0x84 mm/kasan/report.c:521 kasan_report+0xb0/0x110 mm/kasan/report.c:634 __asanreportload2noabort+0x20/0x2c mm/kasan/reportgeneric.c:379 hcisockgetchannel+0x60/0x68 net/bluetooth/hcisock.c:91 mgmtpendingfind+0x7c/0x140 net/bluetooth/mgmtutil.c:223 pendingfind net/bluetooth/mgmt.c:947 [inline] removeadvmonitor+0x44/0x1a4 net/bluetooth/mgmt.c:5445 hcimgmtcmd+0x780/0xc00 net/bluetooth/hcisock.c:1712 hcisocksendmsg+0x544/0xbb0 net/bluetooth/hcisock.c:1832 socksendmsgnosec net/socket.c:712 [inline] __socksendmsg net/socket.c:727 [inline] sockwriteiter+0x25c/0x378 net/socket.c:1131 newsyncwrite fs/readwrite.c:591 [inline] vfswrite+0x62c/0x97c fs/readwrite.c:684 ksyswrite+0x120/0x210 fs/readwrite.c:736 __dosyswrite fs/read_write.c:747 [inline] __sesyswrite fs/read_write.c:744 [inline] __arm64syswrite+0x7c/0x90 fs/read_write.c:744 __invokesyscall arch/arm64/kernel/syscall.c:35 [inline] invokesyscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0svccommon+0x130/0x23c arch/arm64/kernel/syscall.c:132 doel0svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0svc+0x58/0x17c arch/arm64/kernel/entry-common.c:767 el0t64synchandler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t64sync+0x198/0x19c arch/arm64/kernel/entry.S:600

Allocated by task 7037: kasansavestack mm/kasan/common.c:47 [inline] kasansavetrack+0x40/0x78 mm/kasan/common.c:68 kasansaveallocinfo+0x44/0x54 mm/kasan/generic.c:562 poisonkmalloc_redzone mm/kasan/common.c:377 [inline] __kasankmalloc+0x9c/0xb4 mm/kasan/common.c:394 kasankmalloc include/linux/kasan.h:260 [inline] __dokmallocnode mm/slub.c:4327 [inline] __kmallocnoprof+0x2fc/0x4c8 mm/slub.c:4339 kmallocnoprof include/linux/slab.h:909 [inline] skprotalloc+0xc4/0x1f0 net/core/sock.c:2198 skalloc+0x44/0x3ac net/core/sock.c:2254 btsockalloc+0x4c/0x300 net/bluetooth/afbluetooth.c:148 hcisockcreate+0xa8/0x194 net/bluetooth/hcisock.c:2202 btsockcreate+0x14c/0x24c net/bluetooth/afbluetooth.c:132 __sockcreate+0x43c/0x91c net/socket.c:1541 sockcreate net/socket.c:1599 [inline] __syssocketcreate net/socket.c:1636 [inline] __sys_socket+0xd4/0x1c0 net/socket.c:1683 __dosyssocket net/socket.c:1697 [inline] __sesyssocket net/socket.c:1695 [inline] __arm64syssocket+0x7c/0x94 net/socket.c:1695 __invokesyscall arch/arm64/kernel/syscall.c:35 [inline] invokesyscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0svccommon+0x130/0x23c arch/arm64/kernel/syscall.c:132 doel0svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0svc+0x58/0x17c arch/arm64/kernel/entry-common.c:767 el0t64synchandler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t64sync+0x198/0x19c arch/arm64/kernel/entry.S:600

Freed by task 6607: kasansavestack mm/kasan/common.c:47 [inline] kasansavetrack+0x40/0x78 mm/kasan/common.c:68 kasansavefreeinfo+0x58/0x70 mm/kasan/generic.c:576 poisonslab_object mm/kasan/common.c:247 [inline] __kasanslabfree+0x68/0x88 mm/kasan/common.c:264 kasanslabfree include/linux/kasan.h:233 [inline ---truncated---

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38117.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a380b6cff1a2d2139772e88219d08330f84d0381
Fixed
bdd56875c6926d8009914f427df71797693e90d4
Fixed
4e83f2dbb2bf677e614109df24426c4dded472d4
Fixed
d7882db79135c829a922daf3571f33ea1e056ae3
Fixed
6fe26f694c824b8a4dbf50c635bee1302e3f099c

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38117.json"