Hello,
syzbot found the following issue on:
HEAD commit: 60ceadf9247e Linux 6.1.125
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=14b2fa18580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=b19f888c9aaaf309
dashboard link:
https://syzkaller.appspot.com/bug?extid=75e955b086f4b80b9b32
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/20be856f0869/disk-60ceadf9.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/ff73316f8d2c/vmlinux-60ceadf9.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/1f242ddb52f8/Image-60ceadf9.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+75e955...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in hci_conn_unlink net/bluetooth/hci_conn.c:1084 [inline]
BUG: KASAN: use-after-free in hci_conn_hash_flush+0x238/0x330 net/bluetooth/hci_conn.c:2509
Write of size 8 at addr ffff0000cd72aac8 by task syz.2.399/7898
CPU: 0 PID: 7898 Comm: syz.2.399 Not tainted 6.1.125-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0x174/0x4c0 mm/kasan/report.c:427
kasan_report+0xd4/0x130 mm/kasan/report.c:531
__asan_report_store8_noabort+0x2c/0x38 mm/kasan/report_generic.c:356
hci_conn_unlink net/bluetooth/hci_conn.c:1084 [inline]
hci_conn_hash_flush+0x238/0x330 net/bluetooth/hci_conn.c:2509
hci_dev_close_sync+0x7e0/0xf1c net/bluetooth/hci_sync.c:5178
hci_dev_do_close net/bluetooth/hci_core.c:509 [inline]
hci_unregister_dev+0x200/0x4c4 net/bluetooth/hci_core.c:2706
vhci_release+0x7c/0xcc drivers/bluetooth/hci_vhci.c:573
__fput+0x1c8/0x7c8 fs/file_table.c:320
____fput+0x20/0x30 fs/file_table.c:348
task_work_run+0x240/0x2f0 kernel/task_work.c:203
exit_task_work include/linux/task_work.h:39 [inline]
do_exit+0x550/0x1a84 kernel/exit.c:871
do_group_exit+0x194/0x22c kernel/exit.c:1021
get_signal+0x14a0/0x158c kernel/signal.c:2871
do_signal arch/arm64/kernel/signal.c:1076 [inline]
do_notify_resume+0x388/0x2cb8 arch/arm64/kernel/signal.c:1129
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638
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 6977:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:211 [inline]
kmalloc_trace+0x7c/0x94 mm/slab_common.c:1031
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
hci_conn_add+0xcc/0x10ac net/bluetooth/hci_conn.c:989
hci_connect_sco+0x94/0x378 net/bluetooth/hci_conn.c:1629
sco_connect net/bluetooth/sco.c:280 [inline]
sco_sock_connect+0x25c/0x7e8 net/bluetooth/sco.c:616
__sys_connect_file net/socket.c:2011 [inline]
__sys_connect+0x268/0x290 net/socket.c:2028
__do_sys_connect net/socket.c:2038 [inline]
__se_sys_connect net/socket.c:2035 [inline]
__arm64_sys_connect+0x7c/0x94 net/socket.c:2035
__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/0x168 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 7898:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516
____kasan_slab_free+0x144/0x1c0 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 mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0x2c0/0x4b4 mm/slub.c:3674
kfree+0xcc/0x1b8 mm/slab_common.c:988
bt_link_release+0x20/0x30 net/bluetooth/hci_sysfs.c:14
device_release+0x8c/0x1ac
kobject_cleanup lib/kobject.c:681 [inline]
kobject_release lib/kobject.c:712 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x2a8/0x41c lib/kobject.c:729
put_device+0x28/0x40 drivers/base/core.c:3804
hci_conn_del_sysfs+0x7c/0x154 net/bluetooth/hci_sysfs.c:60
hci_conn_cleanup+0x4dc/0x69c net/bluetooth/hci_conn.c:172
hci_conn_del+0x3cc/0x5a8 net/bluetooth/hci_conn.c:1151
hci_conn_hash_flush+0x260/0x330 net/bluetooth/hci_conn.c:2510
hci_dev_close_sync+0x7e0/0xf1c net/bluetooth/hci_sync.c:5178
hci_dev_do_close net/bluetooth/hci_core.c:509 [inline]
hci_unregister_dev+0x200/0x4c4 net/bluetooth/hci_core.c:2706
vhci_release+0x7c/0xcc drivers/bluetooth/hci_vhci.c:573
__fput+0x1c8/0x7c8 fs/file_table.c:320
____fput+0x20/0x30 fs/file_table.c:348
task_work_run+0x240/0x2f0 kernel/task_work.c:203
exit_task_work include/linux/task_work.h:39 [inline]
do_exit+0x550/0x1a84 kernel/exit.c:871
do_group_exit+0x194/0x22c kernel/exit.c:1021
get_signal+0x14a0/0x158c kernel/signal.c:2871
do_signal arch/arm64/kernel/signal.c:1076 [inline]
do_notify_resume+0x388/0x2cb8 arch/arm64/kernel/signal.c:1129
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
The buggy address belongs to the object at ffff0000cd72a000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 2760 bytes inside of
4096-byte region [ffff0000cd72a000, ffff0000cd72b000)
The buggy address belongs to the physical page:
page:000000000d1eefe1 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10d728
head:000000000d1eefe1 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 0000000000000000 dead000000000001 ffff0000c0002a80
raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000cd72a980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000cd72aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff0000cd72aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000cd72ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000cd72ab80: 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