Hello,
syzbot found the following issue on:
HEAD commit: 003148680b79 Linux 5.15.177
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=138456b0580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=27ad1047990e0f7e
dashboard link:
https://syzkaller.appspot.com/bug?extid=3398dbe779d3f154211b
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/c8625d198744/disk-00314868.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/94b56bdfa2ae/vmlinux-00314868.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/640b14c1ba43/Image-00314868.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+3398db...@syzkaller.appspotmail.com
xpad 1-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 1-1:179.65: xpad_irq_out - usb_submit_urb failed with result -19
==================================================================
BUG: KASAN: use-after-free in register_lock_class+0x610/0x6a4 kernel/locking/lockdep.c:1294
Read of size 1 at addr ffff0000d40ec891 by task syz.1.320/5123
CPU: 0 PID: 5123 Comm: syz.1.320 Not tainted 5.15.177-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/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_load1_noabort+0x44/0x50 mm/kasan/report_generic.c:306
register_lock_class+0x610/0x6a4 kernel/locking/lockdep.c:1294
__lock_acquire+0x184/0x7638 kernel/locking/lockdep.c:4891
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
__wake_up_common_lock kernel/sched/wait.c:137 [inline]
__wake_up+0xe8/0x1a0 kernel/sched/wait.c:157
usb_anchor_resume_wakeups+0xcc/0x12c drivers/usb/core/urb.c:958
__usb_hcd_giveback_urb+0x314/0x518 drivers/usb/core/hcd.c:1677
usb_hcd_giveback_urb+0x108/0x41c drivers/usb/core/hcd.c:1757
dummy_timer+0x66c/0x26cc drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x19c/0x8f0 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x554/0x718 kernel/time/timer.c:1767
run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1780
handle_softirqs+0x384/0xdbc kernel/softirq.c:558
__do_softirq kernel/softirq.c:592 [inline]
do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
invoke_softirq kernel/softirq.c:439 [inline]
__irq_exit_rcu+0x268/0x4d8 kernel/softirq.c:641
irq_exit+0x14/0x88 kernel/softirq.c:665
handle_domain_irq+0xf4/0x178 kernel/irq/irqdesc.c:711
gic_handle_irq+0x78/0x1c8 drivers/irqchip/irq-gic-v3.c:765
call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:899
do_interrupt_handler+0x74/0x94 arch/arm64/kernel/entry-common.c:267
el1_interrupt+0x30/0x58 arch/arm64/kernel/entry-common.c:454
el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:470
el1h_64_irq+0x78/0x7c arch/arm64/kernel/entry.S:522
arch_local_irq_restore arch/arm64/include/asm/irqflags.h:122 [inline]
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
_raw_spin_unlock_irqrestore+0xbc/0x158 kernel/locking/spinlock.c:194
spin_unlock_irqrestore include/linux/spinlock.h:418 [inline]
__skb_try_recv_datagram+0x198/0x584 net/core/datagram.c:267
__unix_dgram_recvmsg+0x2f8/0xe64 net/unix/af_unix.c:2304
unix_dgram_recvmsg+0xd4/0xec net/unix/af_unix.c:2402
____sys_recvmsg+0x234/0x720
___sys_recvmsg+0x240/0x2cc net/socket.c:2697
do_recvmmsg+0x310/0x9a4 net/socket.c:2791
__sys_recvmmsg net/socket.c:2870 [inline]
__do_sys_recvmmsg net/socket.c:2893 [inline]
__se_sys_recvmmsg net/socket.c:2886 [inline]
__arm64_sys_recvmmsg+0x180/0x23c net/socket.c:2886
__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
Allocated by task 4280:
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]
kmem_cache_alloc_trace+0x27c/0x47c mm/slub.c:3247
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
xpad_probe+0x350/0x165c drivers/input/joystick/xpad.c:1786
usb_probe_interface+0x500/0x984 drivers/usb/core/driver.c:396
really_probe+0x26c/0xaec drivers/base/dd.c:595
__driver_probe_device+0x194/0x3b4 drivers/base/dd.c:755
driver_probe_device+0x78/0x34c drivers/base/dd.c:785
__device_attach_driver+0x28c/0x4d8 drivers/base/dd.c:907
bus_for_each_drv+0x158/0x1e0 drivers/base/bus.c:429
__device_attach+0x2f0/0x480 drivers/base/dd.c:979
device_initial_probe+0x24/0x34 drivers/base/dd.c:1028
bus_probe_device+0xbc/0x1c8 drivers/base/bus.c:489
device_add+0xae0/0xef4 drivers/base/core.c:3412
usb_set_configuration+0x15e0/0x1b60 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x8c/0x148 drivers/usb/core/generic.c:238
usb_probe_device+0x120/0x25c drivers/usb/core/driver.c:293
really_probe+0x26c/0xaec drivers/base/dd.c:595
__driver_probe_device+0x194/0x3b4 drivers/base/dd.c:755
driver_probe_device+0x78/0x34c drivers/base/dd.c:785
__device_attach_driver+0x28c/0x4d8 drivers/base/dd.c:907
bus_for_each_drv+0x158/0x1e0 drivers/base/bus.c:429
__device_attach+0x2f0/0x480 drivers/base/dd.c:979
device_initial_probe+0x24/0x34 drivers/base/dd.c:1028
bus_probe_device+0xbc/0x1c8 drivers/base/bus.c:489
device_add+0xae0/0xef4 drivers/base/core.c:3412
usb_new_device+0x900/0x1468 drivers/usb/core/hub.c:2593
hub_port_connect drivers/usb/core/hub.c:5457 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5597 [inline]
port_event drivers/usb/core/hub.c:5743 [inline]
hub_event+0x236c/0x46b8 drivers/usb/core/hub.c:5825
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
Freed by task 4187:
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
xpad_disconnect+0x2d4/0x3d8 drivers/input/joystick/xpad.c:1934
usb_unbind_interface+0x1a4/0x758 drivers/usb/core/driver.c:458
__device_release_driver drivers/base/dd.c:1229 [inline]
device_release_driver_internal+0x464/0x6ac drivers/base/dd.c:1262
device_release_driver+0x28/0x38 drivers/base/dd.c:1285
bus_remove_device+0x298/0x38c drivers/base/bus.c:531
device_del+0x57c/0x9b4 drivers/base/core.c:3600
usb_disable_device+0x354/0x760 drivers/usb/core/message.c:1414
usb_disconnect+0x290/0x7e8 drivers/usb/core/hub.c:2248
hub_port_connect drivers/usb/core/hub.c:5301 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5597 [inline]
port_event drivers/usb/core/hub.c:5743 [inline]
hub_event+0x1718/0x46b8 drivers/usb/core/hub.c:5825
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
The buggy address belongs to the object at ffff0000d40ec800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 145 bytes inside of
1024-byte region [ffff0000d40ec800, ffff0000d40ecc00)
The buggy address belongs to the page:
page:0000000082b6c311 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000d40eb800 pfn:0x1140e8
head:0000000082b6c311 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 fffffc00032a7a08 fffffc00034cc408 ffff0000c0002780
raw: ffff0000d40eb800 000000000010000e 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000d40ec780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000d40ec800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff0000d40ec880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000d40ec900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000d40ec980: 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