{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-39860","id":"CVE-2025-39860","title":"Bluetooth: Fix use-after-free in l2cap_sock_cleanup_listen()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: Fix use-after-free in l2cap_sock_cleanup_listen()\n\nsyzbot reported the splat below without a repro.\n\nIn the splat, a single thread calling bt_accept_dequeue() freed sk\nand touched it after that.\n\nThe root cause would be the racy l2cap_sock_cleanup_listen() call\nadded by the cited commit.\n\nbt_accept_dequeue() is called ","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: Fix use-after-free in l2cap_sock_cleanup_listen()\n\nsyzbot reported the splat below without a repro.\n\nIn the splat, a single thread calling bt_accept_dequeue() freed sk\nand touched it after that.\n\nThe root cause would be the racy l2cap_sock_cleanup_listen() call\nadded by the cited commit.\n\nbt_accept_dequeue() is called under lock_sock() except for\nl2cap_sock_release().\n\nTwo threads could see the same socket during the list iteration\nin bt_accept_dequeue():\n\n  CPU1                        CPU2 (close())\n  ----                        ----\n  sock_hold(sk)               sock_hold(sk);\n  lock_sock(sk)   <-- block close()\n  sock_put(sk)\n  bt_accept_unlink(sk)\n    sock_put(sk)  <-- refcnt by bt_accept_enqueue()\n  release_sock(sk)\n                              lock_sock(sk)\n                              sock_put(sk)\n                              bt_accept_unlink(sk)\n                                sock_put(sk)        <-- last refcnt\n                              bt_accept_unlink(sk)  <-- UAF\n\nDepending on the timing, the other thread could show up in the\n\"Freed by task\" part.\n\nLet's call l2cap_sock_cleanup_listen() under lock_sock() in\nl2cap_sock_release().\n\n[0]:\nBUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]\nBUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:115\nRead of size 4 at addr ffff88803b7eb1c4 by task syz.5.3276/16995\nCPU: 3 UID: 0 PID: 16995 Comm: syz.5.3276 Not tainted syzkaller #0 PREEMPT(full)\nHardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014\nCall Trace:\n <TASK>\n __dump_stack lib/dump_stack.c:94 [inline]\n dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120\n print_address_description mm/kasan/report.c:378 [inline]\n print_report+0xcd/0x630 mm/kasan/report.c:482\n kasan_report+0xe0/0x110 mm/kasan/report.c:595\n debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]\n do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:115\n spin_lock_bh include/linux/spinlock.h:356 [inline]\n release_sock+0x21/0x220 net/core/sock.c:3746\n bt_accept_dequeue+0x505/0x600 net/bluetooth/af_bluetooth.c:312\n l2cap_sock_cleanup_listen+0x5c/0x2a0 net/bluetooth/l2cap_sock.c:1451\n l2cap_sock_release+0x5c/0x210 net/bluetooth/l2cap_sock.c:1425\n __sock_release+0xb3/0x270 net/socket.c:649\n sock_close+0x1c/0x30 net/socket.c:1439\n __fput+0x3ff/0xb70 fs/file_table.c:468\n task_work_run+0x14d/0x240 kernel/task_work.c:227\n resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]\n exit_to_user_mode_loop+0xeb/0x110 kernel/entry/common.c:43\n exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]\n syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]\n syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]\n do_syscall_64+0x3f6/0x4c0 arch/x86/entry/syscall_64.c:100\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\nRIP: 0033:0x7f2accf8ebe9\nCode: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48\nRSP: 002b:00007ffdb6cb1378 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4\nRAX: 0000000000000000 RBX: 00000000000426fb RCX: 00007f2accf8ebe9\nRDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003\nRBP: 00007f2acd1b7da0 R08: 0000000000000001 R09: 00000012b6cb166f\nR10: 0000001b30e20000 R11: 0000000000000246 R12: 00007f2acd1b609c\nR13: 00007f2acd1b6090 R14: ffffffffffffffff R15: 00007ffdb6cb1490\n </TASK>\n\nAllocated by task 5326:\n kasan_save_stack+0x33/0x60 mm/kasan/common.c:47\n kasan_save_track+0x14/0x30 mm/kasan/common.c:68\n poison_kmalloc_redzone mm/kasan/common.c:388 [inline]\n __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:405\n kasan_kmalloc include/linux/kasan.h:260 [inline]\n __do_kmalloc_node mm/slub.c:4365 [inline]\n __kmalloc_nopro\n---truncated---","published":"2025-09-19T15:26:30.767Z","updated":"2026-11-17T07:02:05.447028105Z","reserved":"2025-04-16T07:20:57.143Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":8,"vector":"CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"a2da00d1ea1abfb04f846638e210b5b5166e3c9c","lessThan":"964cbb198f9c46c2b2358cd1faffc04c1e8248cf","status":"affected","versionType":"git"},{"version":"06f87c96216bc5cd1094c23492274f77f1d5dd3b","lessThan":"83e1d9892ef51785cf0760b7681436760dda435a","status":"affected","versionType":"git"},{"version":"fbe5a2fed8156cc19eb3b956602b0a1dd46a302d","lessThan":"47f6090bcf75c369695d21c3f179db8a56bbbd49","status":"affected","versionType":"git"},{"version":"29fac18499332211b2615ade356e2bd8b3269f98","lessThan":"2ca99fc3512a8074de20ee52a87b492dfcc41a4d","status":"affected","versionType":"git"},{"version":"1728137b33c00d5a2b5110ed7aafb42e7c32e4a1","lessThan":"6077d16b5c0f65d571eee709de2f0541fb5ef0ca","status":"affected","versionType":"git"},{"version":"1728137b33c00d5a2b5110ed7aafb42e7c32e4a1","lessThan":"306b0991413b482dbf5585b423022123bb505966","status":"affected","versionType":"git"},{"version":"1728137b33c00d5a2b5110ed7aafb42e7c32e4a1","lessThan":"3dff390f55ccd9ce12e91233849769b5312180c2","status":"affected","versionType":"git"},{"version":"1728137b33c00d5a2b5110ed7aafb42e7c32e4a1","lessThan":"862c628108562d8c7a516a900034823b381d3cba","status":"affected","versionType":"git"},{"version":"51822644a047eac2310fab0799b64e3430b5a111","status":"affected","versionType":"git"},{"version":"82cdb2ccbe43337798393369f0ceb98699fe6037","status":"affected","versionType":"git"},{"version":"10426afe65c8bf7b24dd0c7be4dcc65f86fc99f9","status":"affected","versionType":"git"},{"version":"5.4.253","lessThan":"5.4.299","status":"affected","versionType":"semver"},{"version":"5.10.190","lessThan":"5.10.243","status":"affected","versionType":"semver"},{"version":"5.15.126","lessThan":"5.15.192","status":"affected","versionType":"semver"},{"version":"6.1.45","lessThan":"6.1.151","status":"affected","versionType":"semver"},{"version":"4.14.322","lessThan":"4.15","status":"affected","versionType":"semver"},{"version":"4.19.291","lessThan":"4.20","status":"affected","versionType":"semver"},{"version":"6.4.10","lessThan":"6.5","status":"affected","versionType":"semver"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.5","status":"affected"},{"version":"0","lessThan":"6.5","status":"unaffected","versionType":"semver"},{"version":"5.4.299","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.243","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.192","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.151","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.105","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.46","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.16.6","lessThanOrEqual":"6.16.*","status":"unaffected","versionType":"semver"},{"version":"6.17","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/964cbb198f9c46c2b2358cd1faffc04c1e8248cf","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/83e1d9892ef51785cf0760b7681436760dda435a","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/47f6090bcf75c369695d21c3f179db8a56bbbd49","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/2ca99fc3512a8074de20ee52a87b492dfcc41a4d","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/6077d16b5c0f65d571eee709de2f0541fb5ef0ca","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/306b0991413b482dbf5585b423022123bb505966","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/3dff390f55ccd9ce12e91233849769b5312180c2","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/862c628108562d8c7a516a900034823b381d3cba","tags":["Patch","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["Mailing List","Third Party Advisory","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["Mailing List","Third Party Advisory","web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-089022.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39860.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39860","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00241,"epssPercentile":0.15396,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-39860","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39860","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-39860","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-39860","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}