radio-si470x 1-1:0.0: non-zero urb status (-71) ================================================================== BUG: KASAN: use-after-free in si470x_int_in_callback+0xb4c/0x1550 drivers/media/radio/si470x/radio-si470x-usb.c:378 Read of size 8 at addr ffff88802301aac0 by task kworker/1:3/2936 CPU: 1 PID: 2936 Comm: kworker/1:3 Not tainted 6.0.0-rc4-syzkaller-00204-g9b4509495418 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x220 mm/kasan/report.c:433 kasan_report+0xfb/0x130 mm/kasan/report.c:495 si470x_int_in_callback+0xb4c/0x1550 drivers/media/radio/si470x/radio-si470x-usb.c:378 __usb_hcd_giveback_urb+0x369/0x530 drivers/usb/core/hcd.c:1671 dummy_timer+0x86b/0x3110 drivers/usb/gadget/udc/dummy_hcd.c:1988 call_timer_fn+0xf5/0x210 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers+0x76a/0x980 kernel/time/timer.c:1790 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803 __do_softirq+0x382/0x793 kernel/softirq.c:571 __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 RIP: 0010:console_emit_next_record+0x8b6/0xa60 kernel/printk/printk.c:2741 Code: 10 04 1c 00 48 8b 44 24 48 42 80 3c 20 00 44 8a 6c 24 17 4c 8b 74 24 28 48 8b 5c 24 38 74 08 4c 89 f7 e8 3d b0 6f 00 49 ff 06 <48> c7 84 24 80 00 00 00 0e 36 e0 45 49 c7 04 1c 00 00 00 00 49 c7 RSP: 0018:ffffc9000bf86780 EFLAGS: 00000293 RAX: ffffffff816d94c8 RBX: 1ffff920017f0d00 RCX: ffff88807f9ebb00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000bf869b0 R08: ffffffff816d949f R09: fffffbfff1ff4409 R10: fffffbfff1ff4409 R11: 1ffffffff1ff4408 R12: dffffc0000000000 R13: 0000000000000201 R14: 0000000000000046 R15: 0000000000000200 console_unlock+0x26b/0x6f0 kernel/printk/printk.c:2861 vprintk_emit+0xd1/0x1e0 kernel/printk/printk.c:2271 _printk+0xcf/0x10f kernel/printk/printk.c:2292 call_driver_probe+0x1fe/0x250 drivers/base/dd.c:576 really_probe+0x24c/0x9f0 drivers/base/dd.c:639 __driver_probe_device+0x1f4/0x3f0 drivers/base/dd.c:778 driver_probe_device+0x50/0x240 drivers/base/dd.c:808 __device_attach_driver+0x272/0x3c0 drivers/base/dd.c:936 bus_for_each_drv+0x18a/0x210 drivers/base/bus.c:427 __device_attach+0x372/0x5a0 drivers/base/dd.c:1008 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:487 device_add+0xb20/0xf90 drivers/base/core.c:3517 usb_set_configuration+0x1a5f/0x20e0 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0x83/0x140 drivers/usb/core/generic.c:238 usb_probe_device+0x131/0x260 drivers/usb/core/driver.c:293 call_driver_probe+0x96/0x250 really_probe+0x24c/0x9f0 drivers/base/dd.c:639 __driver_probe_device+0x1f4/0x3f0 drivers/base/dd.c:778 driver_probe_device+0x50/0x240 drivers/base/dd.c:808 __device_attach_driver+0x272/0x3c0 drivers/base/dd.c:936 bus_for_each_drv+0x18a/0x210 drivers/base/bus.c:427 __device_attach+0x372/0x5a0 drivers/base/dd.c:1008 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:487 device_add+0xb20/0xf90 drivers/base/core.c:3517 usb_new_device+0xbc2/0x18b0 drivers/usb/core/hub.c:2573 hub_port_connect+0x105b/0x2930 drivers/usb/core/hub.c:5353 hub_port_connect_change+0x619/0xbe0 drivers/usb/core/hub.c:5497 port_event+0xec6/0x13b0 drivers/usb/core/hub.c:5653 hub_event+0x5c1/0xd80 drivers/usb/core/hub.c:5735 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 Allocated by task 2936: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:516 kasan_kmalloc include/linux/kasan.h:234 [inline] kmem_cache_alloc_trace+0x97/0x310 mm/slub.c:3284 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:733 [inline] si470x_usb_driver_probe+0x56/0x26e0 drivers/media/radio/si470x/radio-si470x-usb.c:573 usb_probe_interface+0x66e/0xb60 drivers/usb/core/driver.c:396 call_driver_probe+0x96/0x250 really_probe+0x24c/0x9f0 drivers/base/dd.c:639 __driver_probe_device+0x1f4/0x3f0 drivers/base/dd.c:778 driver_probe_device+0x50/0x240 drivers/base/dd.c:808 __device_attach_driver+0x272/0x3c0 drivers/base/dd.c:936 bus_for_each_drv+0x18a/0x210 drivers/base/bus.c:427 __device_attach+0x372/0x5a0 drivers/base/dd.c:1008 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:487 device_add+0xb20/0xf90 drivers/base/core.c:3517 usb_set_configuration+0x1a5f/0x20e0 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0x83/0x140 drivers/usb/core/generic.c:238 usb_probe_device+0x131/0x260 drivers/usb/core/driver.c:293 call_driver_probe+0x96/0x250 really_probe+0x24c/0x9f0 drivers/base/dd.c:639 __driver_probe_device+0x1f4/0x3f0 drivers/base/dd.c:778 driver_probe_device+0x50/0x240 drivers/base/dd.c:808 __device_attach_driver+0x272/0x3c0 drivers/base/dd.c:936 bus_for_each_drv+0x18a/0x210 drivers/base/bus.c:427 __device_attach+0x372/0x5a0 drivers/base/dd.c:1008 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:487 device_add+0xb20/0xf90 drivers/base/core.c:3517 usb_new_device+0xbc2/0x18b0 drivers/usb/core/hub.c:2573 hub_port_connect+0x105b/0x2930 drivers/usb/core/hub.c:5353 hub_port_connect_change+0x619/0xbe0 drivers/usb/core/hub.c:5497 port_event+0xec6/0x13b0 drivers/usb/core/hub.c:5653 hub_event+0x5c1/0xd80 drivers/usb/core/hub.c:5735 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 Freed by task 2936: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1754 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1780 slab_free mm/slub.c:3534 [inline] kfree+0xda/0x210 mm/slub.c:4562 si470x_usb_driver_probe+0x5a5/0x26e0 drivers/media/radio/si470x/radio-si470x-usb.c:760 usb_probe_interface+0x66e/0xb60 drivers/usb/core/driver.c:396 call_driver_probe+0x96/0x250 really_probe+0x24c/0x9f0 drivers/base/dd.c:639 __driver_probe_device+0x1f4/0x3f0 drivers/base/dd.c:778 driver_probe_device+0x50/0x240 drivers/base/dd.c:808 __device_attach_driver+0x272/0x3c0 drivers/base/dd.c:936 bus_for_each_drv+0x18a/0x210 drivers/base/bus.c:427 __device_attach+0x372/0x5a0 drivers/base/dd.c:1008 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:487 device_add+0xb20/0xf90 drivers/base/core.c:3517 usb_set_configuration+0x1a5f/0x20e0 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0x83/0x140 drivers/usb/core/generic.c:238 usb_probe_device+0x131/0x260 drivers/usb/core/driver.c:293 call_driver_probe+0x96/0x250 really_probe+0x24c/0x9f0 drivers/base/dd.c:639 __driver_probe_device+0x1f4/0x3f0 drivers/base/dd.c:778 driver_probe_device+0x50/0x240 drivers/base/dd.c:808 __device_attach_driver+0x272/0x3c0 drivers/base/dd.c:936 bus_for_each_drv+0x18a/0x210 drivers/base/bus.c:427 __device_attach+0x372/0x5a0 drivers/base/dd.c:1008 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:487 device_add+0xb20/0xf90 drivers/base/core.c:3517 usb_new_device+0xbc2/0x18b0 drivers/usb/core/hub.c:2573 hub_port_connect+0x105b/0x2930 drivers/usb/core/hub.c:5353 hub_port_connect_change+0x619/0xbe0 drivers/usb/core/hub.c:5497 port_event+0xec6/0x13b0 drivers/usb/core/hub.c:5653 hub_event+0x5c1/0xd80 drivers/usb/core/hub.c:5735 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 The buggy address belongs to the object at ffff88802301a000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2752 bytes inside of 4096-byte region [ffff88802301a000, ffff88802301b000) The buggy address belongs to the physical page: page:ffffea00008c0600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23018 head:ffffea00008c0600 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 0000000000000000 dead000000000122 ffff888012042140 raw: 0000000000000000 0000000000040004 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 2974, tgid 2974 (udevd), ts 50113061805, free_ts 50060267188 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5515 alloc_slab_page+0x70/0xf0 mm/slub.c:1824 allocate_slab+0x5e/0x520 mm/slub.c:1969 new_slab mm/slub.c:2029 [inline] ___slab_alloc+0x42e/0xce0 mm/slub.c:3031 __slab_alloc mm/slub.c:3118 [inline] slab_alloc_node mm/slub.c:3209 [inline] slab_alloc mm/slub.c:3251 [inline] __kmalloc+0x2bd/0x370 mm/slub.c:4420 kmalloc include/linux/slab.h:605 [inline] tomoyo_realpath_from_path+0xd8/0x5f0 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x270/0x6b0 security/tomoyo/file.c:822 tomoyo_path_unlink+0xcc/0x100 security/tomoyo/tomoyo.c:149 security_path_unlink+0xc3/0x140 security/security.c:1173 do_unlinkat+0x3fe/0x9a0 fs/namei.c:4293 __do_sys_unlink fs/namei.c:4345 [inline] __se_sys_unlink fs/namei.c:4343 [inline] __x64_sys_unlink+0x45/0x50 fs/namei.c:4343 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x812/0x900 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x7d/0x630 mm/page_alloc.c:3476 free_slab mm/slub.c:2068 [inline] discard_slab mm/slub.c:2074 [inline] __unfreeze_partials+0x1ab/0x200 mm/slub.c:2548 put_cpu_partial+0x116/0x180 mm/slub.c:2624 qlist_free_all+0x2b/0x70 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x169/0x180 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:447 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:727 [inline] slab_alloc_node mm/slub.c:3243 [inline] slab_alloc mm/slub.c:3251 [inline] __kmem_cache_alloc_lru mm/slub.c:3258 [inline] kmem_cache_alloc+0x1a6/0x310 mm/slub.c:3268 getname_flags+0xb8/0x4e0 fs/namei.c:139 user_path_at_empty+0x2a/0x1a0 fs/namei.c:2875 do_readlinkat+0x11b/0x3b0 fs/stat.c:456 __do_sys_readlink fs/stat.c:489 [inline] __se_sys_readlink fs/stat.c:486 [inline] __x64_sys_readlink+0x7b/0x90 fs/stat.c:486 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88802301a980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802301aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802301aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802301ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802301ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 10 04 1c adc %al,(%rsp,%rbx,1) 3: 00 48 8b add %cl,-0x75(%rax) 6: 44 24 48 rex.R and $0x48,%al 9: 42 80 3c 20 00 cmpb $0x0,(%rax,%r12,1) e: 44 8a 6c 24 17 mov 0x17(%rsp),%r13b 13: 4c 8b 74 24 28 mov 0x28(%rsp),%r14 18: 48 8b 5c 24 38 mov 0x38(%rsp),%rbx 1d: 74 08 je 0x27 1f: 4c 89 f7 mov %r14,%rdi 22: e8 3d b0 6f 00 callq 0x6fb064 27: 49 ff 06 incq (%r14) * 2a: 48 c7 84 24 80 00 00 movq $0x45e0360e,0x80(%rsp) <-- trapping instruction 31: 00 0e 36 e0 45 36: 49 c7 04 1c 00 00 00 movq $0x0,(%r12,%rbx,1) 3d: 00 3e: 49 rex.WB 3f: c7 .byte 0xc7