In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: MGMT: Fix slab-use-after-free Read in mgmt_remove_adv_monitor_sync
This fixes the following crash:
==================================================================BUG: KASAN: slab-use-after-free in mgmt_remove_adv_monitor_sync+0x3a/0xd0net/bluetooth/mgmt.c:5543Read of size 8 at addr ffff88814128f898 by task kworker/u9:4/5961
CPU: 1 UID: 0 PID: 5961 Comm: kworker/u9:4 Not tainted 6.12.0-syzkaller-10684-gf1cd565ce577 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: hci0 hci_cmd_sync_work
Call Trace:<TASK>__dump_stacklib/dump_stack.c:94[inline]dump_stack_lvl+0x241/0x360lib/dump_stack.c:120print_address_descriptionmm/kasan/report.c:378[inline]print_report+0x169/0x550mm/kasan/report.c:489kasan_report+0x143/0x180mm/kasan/report.c:602mgmt_remove_adv_monitor_sync+0x3a/0xd0net/bluetooth/mgmt.c:5543hci_cmd_sync_work+0x22b/0x400net/bluetooth/hci_sync.c:332process_one_workkernel/workqueue.c:3229[inline]process_scheduled_works+0xa63/0x1850kernel/workqueue.c:3310worker_thread+0x870/0xd30kernel/workqueue.c:3391kthread+0x2f0/0x390kernel/kthread.c:389ret_from_fork+0x4b/0x80arch/x86/kernel/process.c:147ret_from_fork_asm+0x1a/0x30arch/x86/entry/entry_64.S:244</TASK>Allocated by task 16026:kasan_save_stackmm/kasan/common.c:47[inline]kasan_save_track+0x3f/0x80mm/kasan/common.c:68poison_kmalloc_redzonemm/kasan/common.c:377[inline]__kasan_kmalloc+0x98/0xb0mm/kasan/common.c:394kasan_kmallocinclude/linux/kasan.h:260[inline]__kmalloc_cache_noprof+0x243/0x390mm/slub.c:4314kmalloc_noprofinclude/linux/slab.h:901[inline]kzalloc_noprofinclude/linux/slab.h:1037[inline]mgmt_pending_new+0x65/0x250net/bluetooth/mgmt_util.c:269mgmt_pending_add+0x36/0x120net/bluetooth/mgmt_util.c:296remove_adv_monitor+0x102/0x1b0net/bluetooth/mgmt.c:5568hci_mgmt_cmd+0xc47/0x11d0net/bluetooth/hci_sock.c:1712hci_sock_sendmsg+0x7b8/0x11c0net/bluetooth/hci_sock.c:1832sock_sendmsg_nosecnet/socket.c:711[inline]__sock_sendmsg+0x221/0x270net/socket.c:726sock_write_iter+0x2d7/0x3f0net/socket.c:1147new_sync_writefs/read_write.c:586[inline]vfs_write+0xaeb/0xd30fs/read_write.c:679ksys_write+0x18f/0x2b0fs/read_write.c:731do_syscall_x64arch/x86/entry/common.c:52[inline]do_syscall_64+0xf3/0x230arch/x86/entry/common.c:83entry_SYSCALL_64_after_hwframe+0x77/0x7fFreed by task 16022:kasan_save_stackmm/kasan/common.c:47[inline]kasan_save_track+0x3f/0x80mm/kasan/common.c:68kasan_save_free_info+0x40/0x50mm/kasan/generic.c:582poison_slab_objectmm/kasan/common.c:247[inline]__kasan_slab_free+0x59/0x70mm/kasan/common.c:264kasan_slab_freeinclude/linux/kasan.h:233[inline]slab_free_hookmm/slub.c:2338[inline]slab_freemm/slub.c:4598[inline]kfree+0x196/0x420mm/slub.c:4746mgmt_pending_foreach+0xd1/0x130net/bluetooth/mgmt_util.c:259__mgmt_power_off+0x183/0x430net/bluetooth/mgmt.c:9550hci_dev_close_sync+0x6c4/0x11c0net/bluetooth/hci_sync.c:5208hci_dev_do_closenet/bluetooth/hci_core.c:483[inline]hci_dev_close+0x112/0x210net/bluetooth/hci_core.c:508sock_do_ioctl+0x158/0x460net/socket.c:1209sock_ioctl+0x626/0x8e0net/socket.c:1328vfs_ioctlfs/ioctl.c:51[inline]__do_sys_ioctlfs/ioctl.c:906[inline]__se_sys_ioctl+0xf5/0x170fs/ioctl.c:892do_syscall_x64arch/x86/entry/common.c:52[inline]do_syscall_64+0xf3/0x230arch/x86/entry/common.c:83entry_SYSCALL_64_after_hwframe+0x77/0x7f