Hello,
syzbot found the following issue on:
HEAD commit: f89b6e15694c Linux 6.1.149
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=11af0e62580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=14ab74c2f2001221
dashboard link:
https://syzkaller.appspot.com/bug?extid=b5840caac8c141c87c19
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/0237d8952449/disk-f89b6e15.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/dadca8dfa94c/vmlinux-f89b6e15.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/c73158507817/Image-f89b6e15.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+b5840c...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in __mutex_waiter_is_first kernel/locking/mutex.c:197 [inline]
BUG: KASAN: use-after-free in __mutex_lock_common+0xae8/0x1f38 kernel/locking/mutex.c:681
Read of size 8 at addr ffff0000d5dc4060 by task syz.3.15/4503
CPU: 1 PID: 4503 Comm: syz.3.15 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack+0x30/0x40 lib/dump_stack.c:88
dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106
print_address_description+0x88/0x218 mm/kasan/report.c:316
print_report+0x50/0x68 mm/kasan/report.c:420
kasan_report+0xa8/0x100 mm/kasan/report.c:524
__asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351
__mutex_waiter_is_first kernel/locking/mutex.c:197 [inline]
__mutex_lock_common+0xae8/0x1f38 kernel/locking/mutex.c:681
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
l2cap_register_user+0x70/0x1d4 net/bluetooth/l2cap_core.c:1864
hidp_connection_add+0x10bc/0x1670 net/bluetooth/hidp/core.c:1379
do_hidp_sock_ioctl net/bluetooth/hidp/sock.c:81 [inline]
hidp_sock_ioctl+0x650/0x9f0 net/bluetooth/hidp/sock.c:128
sock_do_ioctl+0xf8/0x240 net/socket.c:1204
sock_ioctl+0x5c4/0x840 net/socket.c:1321
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Allocated by task 4330:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_alloc_info+0x28/0x34 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0xa0/0xb8 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:211 [inline]
__do_kmalloc_node mm/slab_common.c:936 [inline]
__kmalloc+0xec/0x178 mm/slab_common.c:949
kmalloc include/linux/slab.h:568 [inline]
kzalloc include/linux/slab.h:699 [inline]
hci_alloc_dev_priv+0x30/0x18a8 net/bluetooth/hci_core.c:2434
hci_alloc_dev include/net/bluetooth/hci_core.h:1469 [inline]
__vhci_create_device drivers/bluetooth/hci_vhci.c:308 [inline]
vhci_create_device+0xf0/0x6cc drivers/bluetooth/hci_vhci.c:379
vhci_get_user drivers/bluetooth/hci_vhci.c:436 [inline]
vhci_write+0x30c/0x3ac drivers/bluetooth/hci_vhci.c:516
call_write_iter include/linux/fs.h:2265 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x5ac/0x7c4 fs/read_write.c:584
ksys_write+0x120/0x210 fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:646
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Freed by task 4330:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_free_info+0x3c/0x60 mm/kasan/generic.c:516
____kasan_slab_free+0x148/0x1b0 mm/kasan/common.c:236
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:244
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook+0x16c/0x1ec mm/slub.c:1750
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0xc0/0x224 mm/slub.c:3674
kfree+0xd0/0x1ac mm/slab_common.c:988
hci_release_dev+0xf18/0x1034 net/bluetooth/hci_core.c:2764
bt_host_release+0x70/0x8c net/bluetooth/hci_sysfs.c:85
device_release+0x8c/0x1ac drivers/base/core.c:-1
kobject_cleanup lib/kobject.c:681 [inline]
kobject_release lib/kobject.c:712 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x2b0/0x438 lib/kobject.c:729
put_device+0x28/0x40 drivers/base/core.c:3805
hci_free_dev+0x24/0x34 net/bluetooth/hci_core.c:2557
vhci_release+0x84/0xcc drivers/bluetooth/hci_vhci.c:574
__fput+0x1bc/0x7c0 fs/file_table.c:320
____fput+0x20/0x30 fs/file_table.c:348
task_work_run+0x1ec/0x270 kernel/task_work.c:203
exit_task_work include/linux/task_work.h:39 [inline]
do_exit+0x54c/0x19a8 kernel/exit.c:880
do_group_exit+0x194/0x22c kernel/exit.c:1022
__do_sys_exit_group kernel/exit.c:1033 [inline]
__se_sys_exit_group kernel/exit.c:1031 [inline]
__wake_up_parent+0x0/0x60 kernel/exit.c:1031
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204
el0_svc+0x58/0x138 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
Last potentially related work creation:
kasan_save_stack+0x40/0x70 mm/kasan/common.c:45
__kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486
kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496
insert_work+0x64/0x37c kernel/workqueue.c:1361
__queue_work+0xcbc/0x123c kernel/workqueue.c:1520
queue_work_on+0xc0/0x16c kernel/workqueue.c:1548
queue_work include/linux/workqueue.h:512 [inline]
hci_cmd_timeout+0x178/0x1c8 net/bluetooth/hci_core.c:1469
process_one_work+0x7f4/0x13a8 kernel/workqueue.c:2292
worker_thread+0x8c8/0xfbc kernel/workqueue.c:2439
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850
Second to last potentially related work creation:
kasan_save_stack+0x40/0x70 mm/kasan/common.c:45
__kasan_record_aux_stack+0xc0/0xdc mm/kasan/generic.c:486
kasan_record_aux_stack_noalloc+0x14/0x20 mm/kasan/generic.c:496
insert_work+0x64/0x37c kernel/workqueue.c:1361
__queue_work+0xcbc/0x123c kernel/workqueue.c:1520
delayed_work_timer_fn+0x74/0x90 kernel/workqueue.c:1646
call_timer_fn+0x1b8/0x964 kernel/time/timer.c:1504
expire_timers kernel/time/timer.c:1544 [inline]
__run_timers+0x490/0x6bc kernel/time/timer.c:1820
run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1833
handle_softirqs+0x318/0xc6c kernel/softirq.c:596
run_ksoftirqd+0x7c/0x2a0 kernel/softirq.c:963
smpboot_thread_fn+0x4b0/0x964 kernel/smpboot.c:164
kthread+0x250/0x2d8 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850
The buggy address belongs to the object at ffff0000d5dc4000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 96 bytes inside of
8192-byte region [ffff0000d5dc4000, ffff0000d5dc6000)
The buggy address belongs to the physical page:
page:000000007bbe23d2 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x115dc0
head:000000007bbe23d2 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 0000000000000000 dead000000000001 ffff0000c0002c00
raw: 0000000000000000 0000000000020002 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000d5dc3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000d5dc3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff0000d5dc4000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000d5dc4080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000d5dc4100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup