xpad 6-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19 xpad 6-1:179.65: xpad_irq_out - usb_submit_urb failed with result -19 ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x271/0x2c0 kernel/locking/spinlock_debug.c:115 Read of size 4 at addr ffff88806901405c by task syz-executor.3/5389 CPU: 0 PID: 5389 Comm: syz-executor.3 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x271/0x2c0 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:105 [inline] __wake_up+0x1c/0x60 kernel/sched/wait.c:127 __usb_unanchor_urb drivers/usb/core/urb.c:156 [inline] usb_anchor_resume_wakeups+0xc2/0xe0 drivers/usb/core/urb.c:150 __usb_hcd_giveback_urb+0x392/0x5c0 drivers/usb/core/hcd.c:1653 usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1734 dummy_timer+0x17fb/0x3930 drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x1a3/0x5b0 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers+0x74b/0xab0 kernel/time/timer.c:2408 __run_timer_base kernel/time/timer.c:2419 [inline] __run_timer_base kernel/time/timer.c:2412 [inline] run_timer_base+0x111/0x190 kernel/time/timer.c:2428 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2438 __do_softirq+0x21b/0x8de kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:633 [inline] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_is_held_type+0x107/0x150 kernel/locking/lockdep.c:5830 Code: 00 00 b8 ff ff ff ff 65 0f c1 05 4c 56 2f 75 83 f8 01 75 2d 9c 58 f6 c4 02 75 43 48 f7 04 24 00 02 00 00 74 01 fb 48 83 c4 08 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f e9 b7 f2 03 00 45 31 ed eb RSP: 0018:ffffc90002ebfa68 EFLAGS: 00000282 RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffff8b0ccb80 RDI: ffffffff8b6eb4e0 RBP: ffffffff8d7b4980 R08: 0000000000000000 R09: fffffbfff1f3e862 R10: ffffffff8f9f4317 R11: 0000000000000000 R12: ffff888020ab9e00 R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000 lock_is_held include/linux/lockdep.h:231 [inline] schedule_debug kernel/sched/core.c:5982 [inline] __schedule+0x26b1/0x5c70 kernel/sched/core.c:6629 __schedule_loop kernel/sched/core.c:6813 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6828 do_nanosleep+0x216/0x510 kernel/time/hrtimer.c:2051 hrtimer_nanosleep+0x1ab/0x440 kernel/time/hrtimer.c:2104 common_nsleep+0xa1/0xd0 kernel/time/posix-timers.c:1350 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1396 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1373 [inline] __x64_sys_clock_nanosleep+0x347/0x4a0 kernel/time/posix-timers.c:1373 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7f7da6ca9275 Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 b9 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f ba ff ff 48 8b 04 24 48 83 c4 28 f7 d8 RSP: 002b:00007ffdfb54ceb0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 00000000000000c5 RCX: 00007f7da6ca9275 RDX: 00007ffdfb54cef0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007ffdfb54cf7c R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032 R13: 0000000000033dfd R14: 0000000000033dc2 R15: 0000000000000005 Allocated by task 5148: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] xpad_probe+0x27e/0x1f50 drivers/input/joystick/xpad.c:2013 usb_probe_interface+0x30c/0x940 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23d/0xcb0 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x15a/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x1188/0x1ab0 drivers/base/core.c:3639 usb_set_configuration+0x10cb/0x1c50 drivers/usb/core/message.c:2207 usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:254 usb_probe_device+0xef/0x360 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23d/0xcb0 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x15a/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x1188/0x1ab0 drivers/base/core.c:3639 usb_new_device+0xd90/0x1a10 drivers/usb/core/hub.c:2614 hub_port_connect drivers/usb/core/hub.c:5483 [inline] hub_port_connect_change drivers/usb/core/hub.c:5623 [inline] port_event drivers/usb/core/hub.c:5783 [inline] hub_event+0x2db0/0x4e20 drivers/usb/core/hub.c:5865 process_one_work+0x9ac/0x1a60 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c4/0x3a0 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 Freed by task 780: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:240 [inline] __kasan_slab_free+0x11d/0x1a0 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x129/0x370 mm/slub.c:4390 xpad_disconnect+0x1cf/0x580 drivers/input/joystick/xpad.c:2194 usb_unbind_interface+0x1e3/0x8d0 drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:569 [inline] device_remove+0x125/0x170 drivers/base/dd.c:561 __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295 bus_remove_device+0x22f/0x420 drivers/base/bus.c:574 device_del+0x39b/0xa50 drivers/base/core.c:3828 usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416 usb_disconnect+0x2e1/0x920 drivers/usb/core/hub.c:2267 hub_port_connect drivers/usb/core/hub.c:5323 [inline] hub_port_connect_change drivers/usb/core/hub.c:5623 [inline] port_event drivers/usb/core/hub.c:5783 [inline] hub_event+0x1dbb/0x4e20 drivers/usb/core/hub.c:5865 process_one_work+0x9ac/0x1a60 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c4/0x3a0 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 The buggy address belongs to the object at ffff888069014000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 92 bytes inside of freed 1024-byte region [ffff888069014000, ffff888069014400) The buggy address belongs to the physical page: page:ffffea0001a40400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x69010 head:ffffea0001a40400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888015041dc0 ffffea00016c1000 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5008, tgid 5008 (dhcpcd-run-hook), ts 89117479624, free_ts 89089797382 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22b/0x2410 mm/page_alloc.c:4569 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2175 [inline] allocate_slab mm/slub.c:2338 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2391 ___slab_alloc+0x66d/0x1790 mm/slub.c:3525 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3610 __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc+0x3b4/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] load_elf_phdrs+0x103/0x210 fs/binfmt_elf.c:526 load_elf_binary+0x14ce/0x4e10 fs/binfmt_elf.c:955 search_binary_handler fs/exec.c:1777 [inline] exec_binprm fs/exec.c:1819 [inline] bprm_execve fs/exec.c:1871 [inline] bprm_execve+0x706/0x1980 fs/exec.c:1847 do_execveat_common.isra.0+0x5cb/0x750 fs/exec.c:1978 do_execve fs/exec.c:2052 [inline] __do_sys_execve fs/exec.c:2128 [inline] __se_sys_execve fs/exec.c:2123 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2123 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 page last free pid 5007 tgid 5007 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2346 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486 __folio_put+0xeb/0x110 mm/swap.c:127 folio_put include/linux/mm.h:1494 [inline] put_page include/linux/mm.h:1563 [inline] napi_frag_unref include/linux/skbuff.h:3535 [inline] skb_release_data+0x5db/0x990 net/core/skbuff.c:1130 skb_release_all net/core/skbuff.c:1202 [inline] napi_consume_skb+0x15c/0x2b0 net/core/skbuff.c:1512 skb_defer_free_flush net/core/dev.c:6180 [inline] skb_defer_free_flush net/core/dev.c:6164 [inline] net_rx_action+0x3f1/0xf10 net/core/dev.c:6794 __do_softirq+0x21b/0x8de kernel/softirq.c:554 Memory state around the buggy address: ffff888069013f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888069013f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888069014000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888069014080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888069014100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:87 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x281/0x2c0 kernel/locking/spinlock_debug.c:115 Read of size 8 at addr ffff888069014068 by task syz-executor.3/5389 CPU: 0 PID: 5389 Comm: syz-executor.3 Tainted: G B 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 debug_spin_lock_before kernel/locking/spinlock_debug.c:87 [inline] do_raw_spin_lock+0x281/0x2c0 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:105 [inline] __wake_up+0x1c/0x60 kernel/sched/wait.c:127 __usb_unanchor_urb drivers/usb/core/urb.c:156 [inline] usb_anchor_resume_wakeups+0xc2/0xe0 drivers/usb/core/urb.c:150 __usb_hcd_giveback_urb+0x392/0x5c0 drivers/usb/core/hcd.c:1653 usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1734 dummy_timer+0x17fb/0x3930 drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x1a3/0x5b0 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers+0x74b/0xab0 kernel/time/timer.c:2408 __run_timer_base kernel/time/timer.c:2419 [inline] __run_timer_base kernel/time/timer.c:2412 [inline] run_timer_base+0x111/0x190 kernel/time/timer.c:2428 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2438 __do_softirq+0x21b/0x8de kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:633 [inline] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_is_held_type+0x107/0x150 kernel/locking/lockdep.c:5830 Code: 00 00 b8 ff ff ff ff 65 0f c1 05 4c 56 2f 75 83 f8 01 75 2d 9c 58 f6 c4 02 75 43 48 f7 04 24 00 02 00 00 74 01 fb 48 83 c4 08 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f e9 b7 f2 03 00 45 31 ed eb RSP: 0018:ffffc90002ebfa68 EFLAGS: 00000282 RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffff8b0ccb80 RDI: ffffffff8b6eb4e0 RBP: ffffffff8d7b4980 R08: 0000000000000000 R09: fffffbfff1f3e862 R10: ffffffff8f9f4317 R11: 0000000000000000 R12: ffff888020ab9e00 R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000 lock_is_held include/linux/lockdep.h:231 [inline] schedule_debug kernel/sched/core.c:5982 [inline] __schedule+0x26b1/0x5c70 kernel/sched/core.c:6629 __schedule_loop kernel/sched/core.c:6813 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6828 do_nanosleep+0x216/0x510 kernel/time/hrtimer.c:2051 hrtimer_nanosleep+0x1ab/0x440 kernel/time/hrtimer.c:2104 common_nsleep+0xa1/0xd0 kernel/time/posix-timers.c:1350 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1396 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1373 [inline] __x64_sys_clock_nanosleep+0x347/0x4a0 kernel/time/posix-timers.c:1373 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7f7da6ca9275 Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 b9 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f ba ff ff 48 8b 04 24 48 83 c4 28 f7 d8 RSP: 002b:00007ffdfb54ceb0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 00000000000000c5 RCX: 00007f7da6ca9275 RDX: 00007ffdfb54cef0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007ffdfb54cf7c R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032 R13: 0000000000033dfd R14: 0000000000033dc2 R15: 0000000000000005 Allocated by task 5148: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] xpad_probe+0x27e/0x1f50 drivers/input/joystick/xpad.c:2013 usb_probe_interface+0x30c/0x940 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23d/0xcb0 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x15a/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x1188/0x1ab0 drivers/base/core.c:3639 usb_set_configuration+0x10cb/0x1c50 drivers/usb/core/message.c:2207 usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:254 usb_probe_device+0xef/0x360 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23d/0xcb0 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x15a/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x1188/0x1ab0 drivers/base/core.c:3639 usb_new_device+0xd90/0x1a10 drivers/usb/core/hub.c:2614 hub_port_connect drivers/usb/core/hub.c:5483 [inline] hub_port_connect_change drivers/usb/core/hub.c:5623 [inline] port_event drivers/usb/core/hub.c:5783 [inline] hub_event+0x2db0/0x4e20 drivers/usb/core/hub.c:5865 process_one_work+0x9ac/0x1a60 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c4/0x3a0 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 Freed by task 780: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:240 [inline] __kasan_slab_free+0x11d/0x1a0 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x129/0x370 mm/slub.c:4390 xpad_disconnect+0x1cf/0x580 drivers/input/joystick/xpad.c:2194 usb_unbind_interface+0x1e3/0x8d0 drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:569 [inline] device_remove+0x125/0x170 drivers/base/dd.c:561 __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295 bus_remove_device+0x22f/0x420 drivers/base/bus.c:574 device_del+0x39b/0xa50 drivers/base/core.c:3828 usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416 usb_disconnect+0x2e1/0x920 drivers/usb/core/hub.c:2267 hub_port_connect drivers/usb/core/hub.c:5323 [inline] hub_port_connect_change drivers/usb/core/hub.c:5623 [inline] port_event drivers/usb/core/hub.c:5783 [inline] hub_event+0x1dbb/0x4e20 drivers/usb/core/hub.c:5865 process_one_work+0x9ac/0x1a60 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c4/0x3a0 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 The buggy address belongs to the object at ffff888069014000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 104 bytes inside of freed 1024-byte region [ffff888069014000, ffff888069014400) The buggy address belongs to the physical page: page:ffffea0001a40400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x69010 head:ffffea0001a40400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888015041dc0 ffffea00016c1000 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5008, tgid 5008 (dhcpcd-run-hook), ts 89117479624, free_ts 89089797382 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22b/0x2410 mm/page_alloc.c:4569 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2175 [inline] allocate_slab mm/slub.c:2338 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2391 ___slab_alloc+0x66d/0x1790 mm/slub.c:3525 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3610 __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc+0x3b4/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] load_elf_phdrs+0x103/0x210 fs/binfmt_elf.c:526 load_elf_binary+0x14ce/0x4e10 fs/binfmt_elf.c:955 search_binary_handler fs/exec.c:1777 [inline] exec_binprm fs/exec.c:1819 [inline] bprm_execve fs/exec.c:1871 [inline] bprm_execve+0x706/0x1980 fs/exec.c:1847 do_execveat_common.isra.0+0x5cb/0x750 fs/exec.c:1978 do_execve fs/exec.c:2052 [inline] __do_sys_execve fs/exec.c:2128 [inline] __se_sys_execve fs/exec.c:2123 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2123 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 page last free pid 5007 tgid 5007 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2346 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486 __folio_put+0xeb/0x110 mm/swap.c:127 folio_put include/linux/mm.h:1494 [inline] put_page include/linux/mm.h:1563 [inline] napi_frag_unref include/linux/skbuff.h:3535 [inline] skb_release_data+0x5db/0x990 net/core/skbuff.c:1130 skb_release_all net/core/skbuff.c:1202 [inline] napi_consume_skb+0x15c/0x2b0 net/core/skbuff.c:1512 skb_defer_free_flush net/core/dev.c:6180 [inline] skb_defer_free_flush net/core/dev.c:6164 [inline] net_rx_action+0x3f1/0xf10 net/core/dev.c:6794 __do_softirq+0x21b/0x8de kernel/softirq.c:554 Memory state around the buggy address: ffff888069013f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888069013f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888069014000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888069014080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888069014100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:88 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x267/0x2c0 kernel/locking/spinlock_debug.c:115 Read of size 4 at addr ffff888069014060 by task syz-executor.3/5389 CPU: 0 PID: 5389 Comm: syz-executor.3 Tainted: G B 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 debug_spin_lock_before kernel/locking/spinlock_debug.c:88 [inline] do_raw_spin_lock+0x267/0x2c0 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:105 [inline] __wake_up+0x1c/0x60 kernel/sched/wait.c:127 __usb_unanchor_urb drivers/usb/core/urb.c:156 [inline] usb_anchor_resume_wakeups+0xc2/0xe0 drivers/usb/core/urb.c:150 __usb_hcd_giveback_urb+0x392/0x5c0 drivers/usb/core/hcd.c:1653 usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1734 dummy_timer+0x17fb/0x3930 drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x1a3/0x5b0 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers+0x74b/0xab0 kernel/time/timer.c:2408 __run_timer_base kernel/time/timer.c:2419 [inline] __run_timer_base kernel/time/timer.c:2412 [inline] run_timer_base+0x111/0x190 kernel/time/timer.c:2428 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2438 __do_softirq+0x21b/0x8de kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:633 [inline] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_is_held_type+0x107/0x150 kernel/locking/lockdep.c:5830 Code: 00 00 b8 ff ff ff ff 65 0f c1 05 4c 56 2f 75 83 f8 01 75 2d 9c 58 f6 c4 02 75 43 48 f7 04 24 00 02 00 00 74 01 fb 48 83 c4 08 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f e9 b7 f2 03 00 45 31 ed eb RSP: 0018:ffffc90002ebfa68 EFLAGS: 00000282 RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffff8b0ccb80 RDI: ffffffff8b6eb4e0 RBP: ffffffff8d7b4980 R08: 0000000000000000 R09: fffffbfff1f3e862 R10: ffffffff8f9f4317 R11: 0000000000000000 R12: ffff888020ab9e00 R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000 lock_is_held include/linux/lockdep.h:231 [inline] schedule_debug kernel/sched/core.c:5982 [inline] __schedule+0x26b1/0x5c70 kernel/sched/core.c:6629 __schedule_loop kernel/sched/core.c:6813 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6828 do_nanosleep+0x216/0x510 kernel/time/hrtimer.c:2051 hrtimer_nanosleep+0x1ab/0x440 kernel/time/hrtimer.c:2104 common_nsleep+0xa1/0xd0 kernel/time/posix-timers.c:1350 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1396 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1373 [inline] __x64_sys_clock_nanosleep+0x347/0x4a0 kernel/time/posix-timers.c:1373 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7f7da6ca9275 Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 b9 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f ba ff ff 48 8b 04 24 48 83 c4 28 f7 d8 RSP: 002b:00007ffdfb54ceb0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 00000000000000c5 RCX: 00007f7da6ca9275 RDX: 00007ffdfb54cef0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007ffdfb54cf7c R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032 R13: 0000000000033dfd R14: 0000000000033dc2 R15: 0000000000000005 Allocated by task 5148: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] xpad_probe+0x27e/0x1f50 drivers/input/joystick/xpad.c:2013 usb_probe_interface+0x30c/0x940 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23d/0xcb0 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x15a/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x1188/0x1ab0 drivers/base/core.c:3639 usb_set_configuration+0x10cb/0x1c50 drivers/usb/core/message.c:2207 usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:254 usb_probe_device+0xef/0x360 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23d/0xcb0 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x15a/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x1188/0x1ab0 drivers/base/core.c:3639 usb_new_device+0xd90/0x1a10 drivers/usb/core/hub.c:2614 hub_port_connect drivers/usb/core/hub.c:5483 [inline] hub_port_connect_change drivers/usb/core/hub.c:5623 [inline] port_event drivers/usb/core/hub.c:5783 [inline] hub_event+0x2db0/0x4e20 drivers/usb/core/hub.c:5865 process_one_work+0x9ac/0x1a60 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c4/0x3a0 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 Freed by task 780: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:240 [inline] __kasan_slab_free+0x11d/0x1a0 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x129/0x370 mm/slub.c:4390 xpad_disconnect+0x1cf/0x580 drivers/input/joystick/xpad.c:2194 usb_unbind_interface+0x1e3/0x8d0 drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:569 [inline] device_remove+0x125/0x170 drivers/base/dd.c:561 __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295 bus_remove_device+0x22f/0x420 drivers/base/bus.c:574 device_del+0x39b/0xa50 drivers/base/core.c:3828 usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416 usb_disconnect+0x2e1/0x920 drivers/usb/core/hub.c:2267 hub_port_connect drivers/usb/core/hub.c:5323 [inline] hub_port_connect_change drivers/usb/core/hub.c:5623 [inline] port_event drivers/usb/core/hub.c:5783 [inline] hub_event+0x1dbb/0x4e20 drivers/usb/core/hub.c:5865 process_one_work+0x9ac/0x1a60 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c4/0x3a0 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 The buggy address belongs to the object at ffff888069014000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 96 bytes inside of freed 1024-byte region [ffff888069014000, ffff888069014400) The buggy address belongs to the physical page: page:ffffea0001a40400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x69010 head:ffffea0001a40400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888015041dc0 ffffea00016c1000 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5008, tgid 5008 (dhcpcd-run-hook), ts 89117479624, free_ts 89089797382 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22b/0x2410 mm/page_alloc.c:4569 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2175 [inline] allocate_slab mm/slub.c:2338 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2391 ___slab_alloc+0x66d/0x1790 mm/slub.c:3525 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3610 __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc+0x3b4/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] load_elf_phdrs+0x103/0x210 fs/binfmt_elf.c:526 load_elf_binary+0x14ce/0x4e10 fs/binfmt_elf.c:955 search_binary_handler fs/exec.c:1777 [inline] exec_binprm fs/exec.c:1819 [inline] bprm_execve fs/exec.c:1871 [inline] bprm_execve+0x706/0x1980 fs/exec.c:1847 do_execveat_common.isra.0+0x5cb/0x750 fs/exec.c:1978 do_execve fs/exec.c:2052 [inline] __do_sys_execve fs/exec.c:2128 [inline] __se_sys_execve fs/exec.c:2123 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2123 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 page last free pid 5007 tgid 5007 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2346 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486 __folio_put+0xeb/0x110 mm/swap.c:127 folio_put include/linux/mm.h:1494 [inline] put_page include/linux/mm.h:1563 [inline] napi_frag_unref include/linux/skbuff.h:3535 [inline] skb_release_data+0x5db/0x990 net/core/skbuff.c:1130 skb_release_all net/core/skbuff.c:1202 [inline] napi_consume_skb+0x15c/0x2b0 net/core/skbuff.c:1512 skb_defer_free_flush net/core/dev.c:6180 [inline] skb_defer_free_flush net/core/dev.c:6164 [inline] net_rx_action+0x3f1/0xf10 net/core/dev.c:6794 __do_softirq+0x21b/0x8de kernel/softirq.c:554 Memory state around the buggy address: ffff888069013f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888069013f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888069014000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888069014080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888069014100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ================================================================== BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:96 [inline] BUG: KASAN: slab-use-after-free in atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1300 [inline] BUG: KASAN: slab-use-after-free in queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x11e/0x2c0 kernel/locking/spinlock_debug.c:116 Write of size 4 at addr ffff888069014058 by task syz-executor.3/5389 CPU: 0 PID: 5389 Comm: syz-executor.3 Tainted: G B 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0xef/0x1a0 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1300 [inline] queued_spin_lock include/asm-generic/qspinlock.h:111 [inline] do_raw_spin_lock+0x11e/0x2c0 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:105 [inline] __wake_up+0x1c/0x60 kernel/sched/wait.c:127 __usb_unanchor_urb drivers/usb/core/urb.c:156 [inline] usb_anchor_resume_wakeups+0xc2/0xe0 drivers/usb/core/urb.c:150 __usb_hcd_giveback_urb+0x392/0x5c0 drivers/usb/core/hcd.c:1653 usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1734 dummy_timer+0x17fb/0x3930 drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x1a3/0x5b0 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers+0x74b/0xab0 kernel/time/timer.c:2408 __run_timer_base kernel/time/timer.c:2419 [inline] __run_timer_base kernel/time/timer.c:2412 [inline] run_timer_base+0x111/0x190 kernel/time/timer.c:2428 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2438 __do_softirq+0x21b/0x8de kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:633 [inline] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_is_held_type+0x107/0x150 kernel/locking/lockdep.c:5830 Code: 00 00 b8 ff ff ff ff 65 0f c1 05 4c 56 2f 75 83 f8 01 75 2d 9c 58 f6 c4 02 75 43 48 f7 04 24 00 02 00 00 74 01 fb 48 83 c4 08 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f e9 b7 f2 03 00 45 31 ed eb RSP: 0018:ffffc90002ebfa68 EFLAGS: 00000282 RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffff8b0ccb80 RDI: ffffffff8b6eb4e0 RBP: ffffffff8d7b4980 R08: 0000000000000000 R09: fffffbfff1f3e862 R10: ffffffff8f9f4317 R11: 0000000000000000 R12: ffff888020ab9e00 R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000 lock_is_held include/linux/lockdep.h:231 [inline] schedule_debug kernel/sched/core.c:5982 [inline] __schedule+0x26b1/0x5c70 kernel/sched/core.c:6629 __schedule_loop kernel/sched/core.c:6813 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6828 do_nanosleep+0x216/0x510 kernel/time/hrtimer.c:2051 hrtimer_nanosleep+0x1ab/0x440 kernel/time/hrtimer.c:2104 common_nsleep+0xa1/0xd0 kernel/time/posix-timers.c:1350 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1396 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1373 [inline] __x64_sys_clock_nanosleep+0x347/0x4a0 kernel/time/posix-timers.c:1373 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7f7da6ca9275 Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 b9 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f ba ff ff 48 8b 04 24 48 83 c4 28 f7 d8 RSP: 002b:00007ffdfb54ceb0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: ffffffffffffffda RBX: 00000000000000c5 RCX: 00007f7da6ca9275 RDX: 00007ffdfb54cef0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007ffdfb54cf7c R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032 R13: 0000000000033dfd R14: 0000000000033dc2 R15: 0000000000000005 Allocated by task 5148: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kmalloc include/linux/slab.h:628 [inline] kzalloc include/linux/slab.h:749 [inline] xpad_probe+0x27e/0x1f50 drivers/input/joystick/xpad.c:2013 usb_probe_interface+0x30c/0x940 drivers/usb/core/driver.c:399 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23d/0xcb0 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x15a/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x1188/0x1ab0 drivers/base/core.c:3639 usb_set_configuration+0x10cb/0x1c50 drivers/usb/core/message.c:2207 usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:254 usb_probe_device+0xef/0x360 drivers/usb/core/driver.c:294 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23d/0xcb0 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x15a/0x1e0 drivers/base/bus.c:457 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532 device_add+0x1188/0x1ab0 drivers/base/core.c:3639 usb_new_device+0xd90/0x1a10 drivers/usb/core/hub.c:2614 hub_port_connect drivers/usb/core/hub.c:5483 [inline] hub_port_connect_change drivers/usb/core/hub.c:5623 [inline] port_event drivers/usb/core/hub.c:5783 [inline] hub_event+0x2db0/0x4e20 drivers/usb/core/hub.c:5865 process_one_work+0x9ac/0x1a60 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c4/0x3a0 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 Freed by task 780: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:240 [inline] __kasan_slab_free+0x11d/0x1a0 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x129/0x370 mm/slub.c:4390 xpad_disconnect+0x1cf/0x580 drivers/input/joystick/xpad.c:2194 usb_unbind_interface+0x1e3/0x8d0 drivers/usb/core/driver.c:461 device_remove drivers/base/dd.c:569 [inline] device_remove+0x125/0x170 drivers/base/dd.c:561 __device_release_driver drivers/base/dd.c:1272 [inline] device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295 bus_remove_device+0x22f/0x420 drivers/base/bus.c:574 device_del+0x39b/0xa50 drivers/base/core.c:3828 usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416 usb_disconnect+0x2e1/0x920 drivers/usb/core/hub.c:2267 hub_port_connect drivers/usb/core/hub.c:5323 [inline] hub_port_connect_change drivers/usb/core/hub.c:5623 [inline] port_event drivers/usb/core/hub.c:5783 [inline] hub_event+0x1dbb/0x4e20 drivers/usb/core/hub.c:5865 process_one_work+0x9ac/0x1a60 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c4/0x3a0 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 The buggy address belongs to the object at ffff888069014000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 88 bytes inside of freed 1024-byte region [ffff888069014000, ffff888069014400) The buggy address belongs to the physical page: page:ffffea0001a40400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x69010 head:ffffea0001a40400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888015041dc0 ffffea00016c1000 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5008, tgid 5008 (dhcpcd-run-hook), ts 89117479624, free_ts 89089797382 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22b/0x2410 mm/page_alloc.c:4569 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2175 [inline] allocate_slab mm/slub.c:2338 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2391 ___slab_alloc+0x66d/0x1790 mm/slub.c:3525 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3610 __slab_alloc_node mm/slub.c:3663 [inline] slab_alloc_node mm/slub.c:3835 [inline] __do_kmalloc_node mm/slub.c:3965 [inline] __kmalloc+0x3b4/0x440 mm/slub.c:3979 kmalloc include/linux/slab.h:632 [inline] load_elf_phdrs+0x103/0x210 fs/binfmt_elf.c:526 load_elf_binary+0x14ce/0x4e10 fs/binfmt_elf.c:955 search_binary_handler fs/exec.c:1777 [inline] exec_binprm fs/exec.c:1819 [inline] bprm_execve fs/exec.c:1871 [inline] bprm_execve+0x706/0x1980 fs/exec.c:1847 do_execveat_common.isra.0+0x5cb/0x750 fs/exec.c:1978 do_execve fs/exec.c:2052 [inline] __do_sys_execve fs/exec.c:2128 [inline] __se_sys_execve fs/exec.c:2123 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2123 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 page last free pid 5007 tgid 5007 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x527/0xb10 mm/page_alloc.c:2346 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2486 __folio_put+0xeb/0x110 mm/swap.c:127 folio_put include/linux/mm.h:1494 [inline] put_page include/linux/mm.h:1563 [inline] napi_frag_unref include/linux/skbuff.h:3535 [inline] skb_release_data+0x5db/0x990 net/core/skbuff.c:1130 skb_release_all net/core/skbuff.c:1202 [inline] napi_consume_skb+0x15c/0x2b0 net/core/skbuff.c:1512 skb_defer_free_flush net/core/dev.c:6180 [inline] skb_defer_free_flush net/core/dev.c:6164 [inline] net_rx_action+0x3f1/0xf10 net/core/dev.c:6794 __do_softirq+0x21b/0x8de kernel/softirq.c:554 Memory state around the buggy address: ffff888069013f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888069013f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888069014000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888069014080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888069014100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: b8 ff ff ff ff mov $0xffffffff,%eax 7: 65 0f c1 05 4c 56 2f xadd %eax,%gs:0x752f564c(%rip) # 0x752f565b e: 75 f: 83 f8 01 cmp $0x1,%eax 12: 75 2d jne 0x41 14: 9c pushf 15: 58 pop %rax 16: f6 c4 02 test $0x2,%ah 19: 75 43 jne 0x5e 1b: 48 f7 04 24 00 02 00 testq $0x200,(%rsp) 22: 00 23: 74 01 je 0x26 25: fb sti 26: 48 83 c4 08 add $0x8,%rsp * 2a: 44 89 e8 mov %r13d,%eax <-- trapping instruction 2d: 5b pop %rbx 2e: 5d pop %rbp 2f: 41 5c pop %r12 31: 41 5d pop %r13 33: 41 5e pop %r14 35: 41 5f pop %r15 37: e9 b7 f2 03 00 jmp 0x3f2f3 3c: 45 31 ed xor %r13d,%r13d 3f: eb .byte 0xeb