BUG: MAX_LOCKDEP_CHAINS too low!
turning off the locking correctness validator.
CPU: 0 PID: 9790 Comm: kbnepd bnep0 Not tainted 5.15.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
lookup_chain_cache_add kernel/locking/lockdep.c:3735 [inline]
validate_chain kernel/locking/lockdep.c:3756 [inline]
__lock_acquire+0x1b64/0x7638 kernel/locking/lockdep.c:5012
lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xc4/0x14c kernel/locking/spinlock.c:162
debug_object_activate+0x7c/0x4b0 lib/debugobjects.c:694
debug_timer_activate kernel/time/timer.c:729 [inline]
__mod_timer+0x830/0xd30 kernel/time/timer.c:1050
add_timer+0x6c/0x88 kernel/time/timer.c:1159
__queue_delayed_work kernel/workqueue.c:1690 [inline]
queue_delayed_work_on+0x1f4/0x330 kernel/workqueue.c:1715
queue_delayed_work include/linux/workqueue.h:527 [inline]
schedule_delayed_work include/linux/workqueue.h:631 [inline]
kvfree_call_rcu+0x3c8/0x684 kernel/rcu/tree.c:3625
__hw_addr_del_entry net/core/dev_addr_lists.c:145 [inline]
__hw_addr_del_ex+0x418/0x510 net/core/dev_addr_lists.c:194
__dev_mc_del net/core/dev_addr_lists.c:873 [inline]
dev_mc_del+0x8c/0x108 net/core/dev_addr_lists.c:891
ip_mc_filter_del net/ipv4/igmp.c:1168 [inline]
__igmp_group_dropped+0x180/0x5b4 net/ipv4/igmp.c:1301
igmp_group_dropped net/ipv4/igmp.c:1332 [inline]
ip_mc_down+0x130/0x3e0 net/ipv4/igmp.c:1741
inetdev_event+0x24c/0x1234 net/ipv4/devinet.c:1597
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
dev_close_many+0x2fc/0x468 net/core/dev.c:1619
unregister_netdevice_many+0x408/0x189c net/core/dev.c:11078
unregister_netdevice_queue net/core/dev.c:11035 [inline]
unregister_netdevice include/linux/netdevice.h:3012 [inline]
unregister_netdev+0x178/0x1f0 net/core/dev.c:11161
bnep_session+0x2274/0x2424 net/bluetooth/bnep/core.c:525
kthread+0x37c/0x45c kernel/kthread.c:334
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
------------[ cut here ]------------
sysfs group 'byte_queue_limits' not found for kobject 'tx-0'
WARNING: CPU: 0 PID: 9790 at fs/sysfs/group.c:281 sysfs_remove_group+0x174/0x288 fs/sysfs/group.c:279
Modules linked in:
CPU: 0 PID: 9790 Comm: kbnepd bnep0 Not tainted 5.15.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : sysfs_remove_group+0x174/0x288 fs/sysfs/group.c:279
lr : sysfs_remove_group+0x174/0x288 fs/sysfs/group.c:279
sp : ffff8000209c7830
x29: ffff8000209c7830 x28: 1fffe0001dacc0bb x27: 0000000000000000
x26: 0000000000000000 x25: 1fffe0001dacc088 x24: 1ffff000026c5474
x23: dfff800000000000 x22: 0000000000000000 x21: ffff0000e05c1418
x20: ffff0000dbd1c2b8 x19: ffff80001362aa80 x18: 0000000000000001
x17: 0000000000000000 x16: ffff800011ab8a34 x15: 00000000ffffffff
x14: ffff0000d15d9b40 x13: 0000000000000001 x12: 0000000000000001
x11: 0000000000000000 x10: 0000000000000000 x9 : 919f9ec7df651000
x8 : 919f9ec7df651000 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff8000209c6f98 x4 : ffff800014ba05e0 x3 : ffff800008555e80
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 000000000000003c
Call trace:
sysfs_remove_group+0x174/0x288 fs/sysfs/group.c:279
netdev_queue_update_kobjects+0x388/0x404 net/core/net-sysfs.c:1724
remove_queue_kobjects net/core/net-sysfs.c:1823 [inline]
netdev_unregister_kobject+0x100/0x204 net/core/net-sysfs.c:1976
unregister_netdevice_many+0x12c8/0x189c net/core/dev.c:11129
unregister_netdevice_queue net/core/dev.c:11035 [inline]
unregister_netdevice include/linux/netdevice.h:3012 [inline]
unregister_netdev+0x178/0x1f0 net/core/dev.c:11161
bnep_session+0x2274/0x2424 net/bluetooth/bnep/core.c:525
kthread+0x37c/0x45c kernel/kthread.c:334
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
irq event stamp: 287
hardirqs last enabled at (286): [<ffff800011b8f340>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
hardirqs last enabled at (286): [<ffff800011b8f340>] _raw_spin_unlock_irqrestore+0xac/0x158 kernel/locking/spinlock.c:194
hardirqs last disabled at (287): [<ffff800008377ec4>] krc_this_cpu_lock kernel/rcu/tree.c:3197 [inline]
hardirqs last disabled at (287): [<ffff800008377ec4>] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3506 [inline]
hardirqs last disabled at (287): [<ffff800008377ec4>] kvfree_call_rcu+0x1dc/0x684 kernel/rcu/tree.c:3597
softirqs last enabled at (260): [<ffff8000105f0004>] spin_unlock_bh include/linux/spinlock.h:408 [inline]
softirqs last enabled at (260): [<ffff8000105f0004>] ip_vs_dst_event+0x580/0x5b4 net/netfilter/ipvs/ip_vs_ctl.c:1727
softirqs last disabled at (280): [<ffff80000ff20248>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:18
---[ end trace 08579a24fc8daeb4 ]---
==================================================================
BUG: KASAN: use-after-free in device_for_each_child+0xa8/0x174 drivers/base/core.c:3728
Read of size 8 at addr ffff0000d0f49388 by task kbnepd bnep0/9790
CPU: 0 PID: 9790 Comm: kbnepd bnep0 Tainted: G W 5.15.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_address_description+0x7c/0x3f0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0x174/0x1e4 mm/kasan/report.c:451
__asan_report_load8_noabort+0x44/0x50 mm/kasan/report_generic.c:309
device_for_each_child+0xa8/0x174 drivers/base/core.c:3728
pm_runtime_set_memalloc_noio+0xf0/0x210 drivers/base/power/runtime.c:246
netdev_unregister_kobject+0x144/0x204 net/core/net-sysfs.c:1978
unregister_netdevice_many+0x12c8/0x189c net/core/dev.c:11129
unregister_netdevice_queue net/core/dev.c:11035 [inline]
unregister_netdevice include/linux/netdevice.h:3012 [inline]
unregister_netdev+0x178/0x1f0 net/core/dev.c:11161
bnep_session+0x2274/0x2424 net/bluetooth/bnep/core.c:525
kthread+0x37c/0x45c kernel/kthread.c:334
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
Allocated by task 8158:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc+0xbc/0xfc mm/kasan/common.c:513
__kasan_kmalloc+0x10/0x1c mm/kasan/common.c:522
kasan_kmalloc include/linux/kasan.h:264 [inline]
__kmalloc+0x29c/0x4c8 mm/slub.c:4407
kmalloc include/linux/slab.h:596 [inline]
kzalloc include/linux/slab.h:721 [inline]
hci_alloc_dev_priv+0x30/0x18b0 net/bluetooth/hci_core.c:3775
hci_alloc_dev include/net/bluetooth/hci_core.h:1242 [inline]
__vhci_create_device drivers/bluetooth/hci_vhci.c:102 [inline]
vhci_create_device+0xf8/0x568 drivers/bluetooth/hci_vhci.c:153
vhci_get_user drivers/bluetooth/hci_vhci.c:210 [inline]
vhci_write+0x318/0x3b8 drivers/bluetooth/hci_vhci.c:290
call_write_iter include/linux/fs.h:2174 [inline]
new_sync_write fs/read_write.c:507 [inline]
vfs_write+0x884/0xb44 fs/read_write.c:594
ksys_write+0x15c/0x26c fs/read_write.c:647
__do_sys_write fs/read_write.c:659 [inline]
__se_sys_write fs/read_write.c:656 [inline]
__arm64_sys_write+0x7c/0x90 fs/read_write.c:656
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Freed by task 11141:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4c/0x84 mm/kasan/common.c:46
kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360
____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:374
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1705 [inline]
slab_free_freelist_hook+0x128/0x1ec mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0x178/0x410 mm/slub.c:4559
hci_release_dev+0x1004/0x116c net/bluetooth/hci_core.c:4096
bt_host_release+0x70/0x88 net/bluetooth/hci_sysfs.c:92
device_release+0x8c/0x1ac
kobject_cleanup lib/kobject.c:713 [inline]
kobject_release lib/kobject.c:744 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x2c4/0x438 lib/kobject.c:761
put_device+0x28/0x40 drivers/base/core.c:3520
hci_free_dev+0x24/0x34 net/bluetooth/hci_core.c:3895
vhci_release+0x7c/0xc4 drivers/bluetooth/hci_vhci.c:346
__fput+0x1c4/0x800 fs/file_table.c:280
____fput+0x20/0x30 fs/file_table.c:308
task_work_run+0x130/0x1e4 kernel/task_work.c:188
exit_task_work include/linux/task_work.h:33 [inline]
do_exit+0x670/0x20bc kernel/exit.c:874
do_group_exit+0x110/0x268 kernel/exit.c:996
get_signal+0x634/0x1550 kernel/signal.c:2900
do_signal arch/arm64/kernel/signal.c:890 [inline]
do_notify_resume+0x3d0/0x32b8 arch/arm64/kernel/signal.c:943
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline]
el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Last potentially related work creation:
kasan_save_stack+0x38/0x68 mm/kasan/common.c:38
kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348
insert_work+0x64/0x394 kernel/workqueue.c:1366
__queue_work+0xb84/0x114c kernel/workqueue.c:1532
queue_work_on+0xc4/0x17c kernel/workqueue.c:1559
queue_work include/linux/workqueue.h:512 [inline]
req_run+0x290/0x3c4 net/bluetooth/hci_request.c:88
hci_req_run net/bluetooth/hci_request.c:95 [inline]
hci_abort_conn+0x17c/0x294 net/bluetooth/hci_request.c:2927
hci_disconnect+0xe4/0x288 net/bluetooth/hci_conn.c:273
hci_link_tx_to net/bluetooth/hci_core.c:4540 [inline]
__check_timeout+0x2d8/0x3fc net/bluetooth/hci_core.c:4705
hci_sched_le net/bluetooth/hci_core.c:4888 [inline]
hci_tx_work+0xde8/0x16cc net/bluetooth/hci_core.c:4933
process_one_work+0x790/0x11b8 kernel/workqueue.c:2310
worker_thread+0x910/0x1034 kernel/workqueue.c:2457
kthread+0x37c/0x45c kernel/kthread.c:334
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
Second to last potentially related work creation:
kasan_save_stack+0x38/0x68 mm/kasan/common.c:38
kasan_record_aux_stack+0xd4/0x11c mm/kasan/generic.c:348
insert_work+0x64/0x394 kernel/workqueue.c:1366
__queue_work+0xb84/0x114c kernel/workqueue.c:1532
queue_work_on+0xc4/0x17c kernel/workqueue.c:1559
queue_work include/linux/workqueue.h:512 [inline]
hci_send_acl+0x7a8/0xaa4 net/bluetooth/hci_core.c:4439
l2cap_do_send+0x238/0x350
l2cap_chan_send+0x190c/0x1e5c
l2cap_sock_sendmsg+0x184/0x2a8 net/bluetooth/l2cap_sock.c:1173
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
sock_sendmsg net/socket.c:739 [inline]
kernel_sendmsg+0x1c8/0x2a0 net/socket.c:763
bnep_tx_frame net/bluetooth/bnep/core.c:466 [inline]
bnep_session+0x1e38/0x2424 net/bluetooth/bnep/core.c:509
kthread+0x37c/0x45c kernel/kthread.c:334
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
The buggy address belongs to the object at ffff0000d0f48000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 5000 bytes inside of
8192-byte region [ffff0000d0f48000, ffff0000d0f4a000)
The buggy address belongs to the page:
page:0000000019243136 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x110f48
head:0000000019243136 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 0000000000000000 dead000000000122 ffff0000c0002c00
raw: 0000000000000000 0000000000020002 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000d0f49280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000d0f49300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff0000d0f49380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000d0f49400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000d0f49480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
================================================================================
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:130:9
index 14635 is out of range for type 'unsigned long[8]'
CPU: 0 PID: 9790 Comm: kbnepd bnep0 Tainted: G B W 5.15.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0x108/0x15c lib/ubsan.c:282
decode_tail kernel/locking/qspinlock.c:130 [inline]
queued_spin_lock_slowpath+0x854/0x938 kernel/locking/qspinlock.c:468
queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
do_raw_spin_lock+0x334/0x35c kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline]
_raw_spin_lock_irqsave+0xcc/0x14c kernel/locking/spinlock.c:162
klist_next+0x8c/0x2f4 lib/klist.c:382
next_device drivers/base/core.c:3653 [inline]
device_for_each_child+0xc0/0x174 drivers/base/core.c:3732
pm_runtime_set_memalloc_noio+0xf0/0x210 drivers/base/power/runtime.c:246
netdev_unregister_kobject+0x144/0x204 net/core/net-sysfs.c:1978
unregister_netdevice_many+0x12c8/0x189c net/core/dev.c:11129
unregister_netdevice_queue net/core/dev.c:11035 [inline]
unregister_netdevice include/linux/netdevice.h:3012 [inline]
unregister_netdev+0x178/0x1f0 net/core/dev.c:11161
bnep_session+0x2274/0x2424 net/bluetooth/bnep/core.c:525
kthread+0x37c/0x45c kernel/kthread.c:334
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
================================================================================
Unable to handle kernel paging request at virtual address ebde0709c324affa
Mem abort info:
ESR = 0x0000000096000004
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x04: level 0 translation fault
Data abort info:
ISV = 0, ISS = 0x00000004
CM = 0, WnR = 0
[ebde0709c324affa] address between user and kernel address ranges
Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 9790 Comm: kbnepd bnep0 Tainted: G B W 5.15.173-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : queued_spin_lock_slowpath+0x354/0x938 kernel/locking/qspinlock.c:471
lr : decode_tail kernel/locking/qspinlock.c:130 [inline]
lr : queued_spin_lock_slowpath+0x854/0x938 kernel/locking/qspinlock.c:468
sp : ffff8000209c7580
x29: ffff8000209c7620 x28: 1ffff00004138ebc x27: 0000000000000000
x26: dfff800000000000 x25: ffff700004138eb4 x24: 0000000000040000
x23: 5ef4384e19257fd6 x22: ffff0001b41a1708 x21: ffff0001b41a1700
x20: ffff800014a27720 x19: ffff0000e59cc400 x18: 0000000000000002
x17: 0000000000000000 x16: ffff8000083364dc x15: 00000000ffffffff
x14: ffff0000d15d9b40 x13: 0000000000000001 x12: ffff700002e22564
x11: 0000000000000001 x10: ffff800014a27700 x9 : 0000000000000002
x8 : 0bde8709c324affa x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff8000209c6c78 x4 : ffff800014ba05e0 x3 : ffff80000819c3ec
x2 : 0000000000000001 x1 : 0000000000000003 x0 : 00000000ffffffff
Call trace:
queued_spin_lock_slowpath+0x354/0x938 kernel/locking/qspinlock.c:471
queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
do_raw_spin_lock+0x334/0x35c kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline]
_raw_spin_lock_irqsave+0xcc/0x14c kernel/locking/spinlock.c:162
klist_next+0x8c/0x2f4 lib/klist.c:382
next_device drivers/base/core.c:3653 [inline]
device_for_each_child+0xc0/0x174 drivers/base/core.c:3732
pm_runtime_set_memalloc_noio+0xf0/0x210 drivers/base/power/runtime.c:246
netdev_unregister_kobject+0x144/0x204 net/core/net-sysfs.c:1978
unregister_netdevice_many+0x12c8/0x189c net/core/dev.c:11129
unregister_netdevice_queue net/core/dev.c:11035 [inline]
unregister_netdevice include/linux/netdevice.h:3012 [inline]
unregister_netdev+0x178/0x1f0 net/core/dev.c:11161
bnep_session+0x2274/0x2424 net/bluetooth/bnep/core.c:525
kthread+0x37c/0x45c kernel/kthread.c:334
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870
Code: 941744c0 f94002e8 8b140117 d343fee8 (387a6908)
---[ end trace 08579a24fc8daeb5 ]---
----------------
Code disassembly (best guess):
0: 941744c0 bl 0x5d1300
4: f94002e8 ldr x8, [x23]
8: 8b140117 add x23, x8, x20
c: d343fee8 lsr x8, x23, #3
* 10: 387a6908 ldrb w8, [x8, x26] <-- trapping instruction