radio-si470x 1-1:0.0: non-zero urb status (-71) radio-si470x 4-1:0.0: non-zero urb status (-71) ================================================================== BUG: KASAN: use-after-free in si470x_int_in_callback.cold+0xfe/0x11f drivers/media/radio/si470x/radio-si470x-usb.c:378 Read of size 8 at addr ffff8880226d4b88 by task kworker/0:4/6872 CPU: 0 PID: 6872 Comm: kworker/0:4 Not tainted 5.15.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x2d6 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 si470x_int_in_callback.cold+0xfe/0x11f drivers/media/radio/si470x/radio-si470x-usb.c:378 __usb_hcd_giveback_urb+0x238/0x3f0 drivers/usb/core/hcd.c:1656 dummy_timer+0xeb8/0x2eb0 drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x163/0x4a0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x524/0x890 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0x9c/0x190 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:636 irq_exit_rcu+0x5/0x20 kernel/softirq.c:648 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:console_trylock_spinning kernel/printk/printk.c:1885 [inline] RIP: 0010:vprintk_emit+0x21c/0x2f0 kernel/printk/printk.c:2243 Code: 8a e8 c8 0a fe ff e8 83 09 00 00 48 85 db 0f 85 c5 00 00 00 9c 58 f6 c4 02 0f 85 c4 00 00 00 48 85 db 74 01 fb 68 17 43 54 81 <45> 31 c9 41 b8 01 00 00 00 31 c9 ba 01 00 00 00 31 f6 48 c7 c7 20 RSP: 0018:ffffc900033c7100 EFLAGS: 00000206 RAX: 0000000000000006 RBX: 0000000000000200 RCX: 1ffffffff1dc56e2 RDX: 0000000000000000 RSI: ffffffff88cb3600 RDI: ffffffff891fe7a0 RBP: ffffc900033c7140 R08: 0000000000000001 R09: ffffffff8ee0298f R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000034 R13: 0000000000000000 R14: ffffffff8936de60 R15: 0000000000000000 _printk+0xad/0xde kernel/printk/printk.c:2265 call_driver_probe drivers/base/dd.c:533 [inline] really_probe.cold+0x5b/0x226 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa5c/0x1e10 drivers/base/core.c:3359 usb_set_configuration+0xc1d/0x1710 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0x74/0xa0 drivers/usb/core/generic.c:238 usb_probe_device+0x95/0x240 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa5c/0x1e10 drivers/base/core.c:3359 usb_new_device.cold+0x5cf/0xedf drivers/usb/core/hub.c:2563 hub_port_connect drivers/usb/core/hub.c:5348 [inline] hub_port_connect_change drivers/usb/core/hub.c:5488 [inline] port_event drivers/usb/core/hub.c:5634 [inline] hub_event+0x10a3/0x36c0 drivers/usb/core/hub.c:5716 process_one_work+0x87f/0x1450 kernel/workqueue.c:2297 worker_thread+0x598/0x1040 kernel/workqueue.c:2444 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 6872: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa1/0xd0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x1e4/0x480 mm/slab.c:3575 kmalloc include/linux/slab.h:591 [inline] kzalloc include/linux/slab.h:721 [inline] si470x_usb_driver_probe+0x4a/0xf70 drivers/media/radio/si470x/radio-si470x-usb.c:573 usb_probe_interface+0x274/0x6a0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa5c/0x1e10 drivers/base/core.c:3359 usb_set_configuration+0xc1d/0x1710 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0x74/0xa0 drivers/usb/core/generic.c:238 usb_probe_device+0x95/0x240 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa5c/0x1e10 drivers/base/core.c:3359 usb_new_device.cold+0x5cf/0xedf drivers/usb/core/hub.c:2563 hub_port_connect drivers/usb/core/hub.c:5348 [inline] hub_port_connect_change drivers/usb/core/hub.c:5488 [inline] port_event drivers/usb/core/hub.c:5634 [inline] hub_event+0x10a3/0x36c0 drivers/usb/core/hub.c:5716 process_one_work+0x87f/0x1450 kernel/workqueue.c:2297 worker_thread+0x598/0x1040 kernel/workqueue.c:2444 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Freed by task 6872: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free mm/kasan/common.c:328 [inline] __kasan_slab_free+0xd1/0x110 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] __cache_free mm/slab.c:3445 [inline] kfree+0x10a/0x2c0 mm/slab.c:3803 si470x_usb_driver_probe+0xa20/0xf70 drivers/media/radio/si470x/radio-si470x-usb.c:766 usb_probe_interface+0x274/0x6a0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa5c/0x1e10 drivers/base/core.c:3359 usb_set_configuration+0xc1d/0x1710 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0x74/0xa0 drivers/usb/core/generic.c:238 usb_probe_device+0x95/0x240 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x1c2/0xb60 drivers/base/dd.c:596 __driver_probe_device+0x2a6/0x460 drivers/base/dd.c:751 driver_probe_device+0x44/0x110 drivers/base/dd.c:781 __device_attach_driver+0x185/0x250 drivers/base/dd.c:898 bus_for_each_drv+0x11e/0x1a0 drivers/base/bus.c:427 __device_attach+0x1db/0x410 drivers/base/dd.c:969 bus_probe_device+0x19d/0x250 drivers/base/bus.c:487 device_add+0xa5c/0x1e10 drivers/base/core.c:3359 usb_new_device.cold+0x5cf/0xedf drivers/usb/core/hub.c:2563 hub_port_connect drivers/usb/core/hub.c:5348 [inline] hub_port_connect_change drivers/usb/core/hub.c:5488 [inline] port_event drivers/usb/core/hub.c:5634 [inline] hub_event+0x10a3/0x36c0 drivers/usb/core/hub.c:5716 process_one_work+0x87f/0x1450 kernel/workqueue.c:2297 worker_thread+0x598/0x1040 kernel/workqueue.c:2444 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff8880226d4000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2952 bytes inside of 4096-byte region [ffff8880226d4000, ffff8880226d5000) The buggy address belongs to the page: page:ffffea000089b500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x226d4 head:ffffea000089b500 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00007f8508 ffffea00006a8d08 ffff88800fc40900 raw: 0000000000000000 ffff8880226d4000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x242040(__GFP_IO|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 6491, ts 45223926992, free_ts 45184469017 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa6f/0x2f50 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 __alloc_pages_node include/linux/gfp.h:570 [inline] kmem_getpages mm/slab.c:1377 [inline] cache_grow_begin+0x75/0x460 mm/slab.c:2593 cache_alloc_refill+0x27f/0x380 mm/slab.c:2965 ____cache_alloc mm/slab.c:3048 [inline] ____cache_alloc mm/slab.c:3031 [inline] __do_cache_alloc mm/slab.c:3275 [inline] slab_alloc mm/slab.c:3316 [inline] __do_kmalloc mm/slab.c:3700 [inline] __kmalloc+0x3d5/0x4d0 mm/slab.c:3711 kmalloc include/linux/slab.h:596 [inline] tomoyo_realpath_from_path+0xb0/0x6a0 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1fb/0x350 security/tomoyo/file.c:822 security_inode_getattr+0xab/0x100 security/security.c:1333 vfs_getattr fs/stat.c:157 [inline] vfs_statx+0xe8/0x2e0 fs/stat.c:225 vfs_fstatat fs/stat.c:243 [inline] vfs_lstat include/linux/fs.h:3356 [inline] __do_sys_newlstat+0x85/0xe0 fs/stat.c:398 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x2c5/0x780 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3315 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3394 slab_destroy mm/slab.c:1627 [inline] slabs_destroy+0x89/0xc0 mm/slab.c:1647 cache_flusharray mm/slab.c:3418 [inline] ___cache_free+0x4c6/0x610 mm/slab.c:3480 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x4e/0x110 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x92/0xa0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc mm/slab.c:3323 [inline] kmem_cache_alloc+0x25f/0x540 mm/slab.c:3507 getname_flags.part.0+0x4a/0x440 fs/namei.c:138 do_sys_openat2+0xd2/0x400 fs/open.c:1194 do_sys_open fs/open.c:1216 [inline] __do_sys_open fs/open.c:1224 [inline] __se_sys_open fs/open.c:1220 [inline] __x64_sys_open+0xfd/0x1a0 fs/open.c:1220 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff8880226d4a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880226d4b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880226d4b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880226d4c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880226d4c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 8a e8 mov %al,%ch 2: c8 0a fe ff enterq $0xfe0a,$0xff 6: e8 83 09 00 00 callq 0x98e b: 48 85 db test %rbx,%rbx e: 0f 85 c5 00 00 00 jne 0xd9 14: 9c pushfq 15: 58 pop %rax 16: f6 c4 02 test $0x2,%ah 19: 0f 85 c4 00 00 00 jne 0xe3 1f: 48 85 db test %rbx,%rbx 22: 74 01 je 0x25 24: fb sti 25: 68 17 43 54 81 pushq $0xffffffff81544317 * 2a: 45 31 c9 xor %r9d,%r9d <-- trapping instruction 2d: 41 b8 01 00 00 00 mov $0x1,%r8d 33: 31 c9 xor %ecx,%ecx 35: ba 01 00 00 00 mov $0x1,%edx 3a: 31 f6 xor %esi,%esi 3c: 48 rex.W 3d: c7 .byte 0xc7 3e: c7 (bad) 3f: 20 .byte 0x20