radio-si470x 1-1:0.0: non-zero urb status (-71) ================================================================== BUG: KASAN: use-after-free in si470x_int_in_callback.cold+0x96/0xbf drivers/media/radio/si470x/radio-si470x-usb.c:378 Read of size 8 at addr ffff88802ed8ab40 by task kworker/0:3/3157 CPU: 0 PID: 3157 Comm: kworker/0:3 Not tainted 5.13.0-rc3-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:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 si470x_int_in_callback.cold+0x96/0xbf drivers/media/radio/si470x/radio-si470x-usb.c:378 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726 dummy_timer+0x11f4/0x32a0 drivers/usb/gadget/udc/dummy_hcd.c:1978 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers.part.0+0x67c/0xa50 kernel/time/timer.c:1745 __run_timers kernel/time/timer.c:1726 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1758 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 invoke_softirq kernel/softirq.c:433 [inline] __irq_exit_rcu+0x136/0x200 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647 RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:27 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:163 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:197 Code: f0 4d 89 03 e9 f2 fc ff ff b9 ff ff ff ff ba 08 00 00 00 4d 8b 03 48 0f bd ca 49 8b 45 00 48 63 c9 e9 64 ff ff ff 0f 1f 40 00 <65> 8b 05 39 13 8d 7e 89 c1 48 8b 34 24 81 e1 00 01 00 00 65 48 8b RSP: 0018:ffffc90002aaef98 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88801f7b8000 RSI: ffffffff815cb113 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff902268a7 R10: ffffffff815cb109 R11: 0000000000000000 R12: ffffffff84bbfa00 R13: 0000000000000200 R14: dffffc0000000000 R15: ffffc90002aaeff8 console_unlock+0x7c9/0xc40 kernel/printk/printk.c:2653 vprintk_emit+0x1ca/0x560 kernel/printk/printk.c:2174 vprintk+0x8d/0x260 kernel/printk/printk_safe.c:392 printk+0xba/0xed kernel/printk/printk.c:2216 really_probe.cold+0x147/0x248 drivers/base/dd.c:667 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4b0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_set_configuration+0x113f/0x1910 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4b0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_new_device.cold+0x721/0x1058 drivers/usb/core/hub.c:2556 hub_port_connect drivers/usb/core/hub.c:5276 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x2357/0x4330 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1600 kernel/workqueue.c:2276 worker_thread+0x64c/0x1120 kernel/workqueue.c:2422 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 3157: 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:428 [inline] ____kasan_kmalloc mm/kasan/common.c:507 [inline] ____kasan_kmalloc mm/kasan/common.c:466 [inline] __kasan_kmalloc+0x9b/0xd0 mm/kasan/common.c:516 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:686 [inline] si470x_usb_driver_probe+0x51/0xf30 drivers/media/radio/si470x/radio-si470x-usb.c:573 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4b0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_set_configuration+0x113f/0x1910 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4b0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_new_device.cold+0x721/0x1058 drivers/usb/core/hub.c:2556 hub_port_connect drivers/usb/core/hub.c:5276 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x2357/0x4330 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1600 kernel/workqueue.c:2276 worker_thread+0x64c/0x1120 kernel/workqueue.c:2422 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Freed by task 3157: 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:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xfb/0x130 mm/kasan/common.c:368 kasan_slab_free include/linux/kasan.h:212 [inline] slab_free_hook mm/slub.c:1582 [inline] slab_free_freelist_hook+0xdf/0x240 mm/slub.c:1607 slab_free mm/slub.c:3167 [inline] kfree+0xe5/0x7f0 mm/slub.c:4217 si470x_usb_driver_probe+0xb0f/0xf30 drivers/media/radio/si470x/radio-si470x-usb.c:766 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4b0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_set_configuration+0x113f/0x1910 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293 really_probe+0x291/0xf60 drivers/base/dd.c:576 driver_probe_device+0x298/0x410 drivers/base/dd.c:763 __device_attach_driver+0x203/0x2c0 drivers/base/dd.c:870 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x228/0x4b0 drivers/base/dd.c:938 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xbe0/0x2100 drivers/base/core.c:3320 usb_new_device.cold+0x721/0x1058 drivers/usb/core/hub.c:2556 hub_port_connect drivers/usb/core/hub.c:5276 [inline] hub_port_connect_change drivers/usb/core/hub.c:5416 [inline] port_event drivers/usb/core/hub.c:5562 [inline] hub_event+0x2357/0x4330 drivers/usb/core/hub.c:5644 process_one_work+0x98d/0x1600 kernel/workqueue.c:2276 worker_thread+0x64c/0x1120 kernel/workqueue.c:2422 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff88802ed8a000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2880 bytes inside of 4096-byte region [ffff88802ed8a000, ffff88802ed8b000) The buggy address belongs to the page: page:ffffea0000bb6200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2ed88 head:ffffea0000bb6200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888011042140 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 7543, ts 35705847464, free_ts 35646152828 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5200 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1645 [inline] allocate_slab+0x2c5/0x4c0 mm/slub.c:1785 new_slab mm/slub.c:1848 [inline] new_slab_objects mm/slub.c:2594 [inline] ___slab_alloc+0x4a1/0x810 mm/slub.c:2757 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2797 slab_alloc_node mm/slub.c:2879 [inline] slab_alloc mm/slub.c:2921 [inline] __kmalloc+0x315/0x330 mm/slub.c:4055 kmalloc include/linux/slab.h:561 [inline] tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x140 security/security.c:1332 vfs_getattr fs/stat.c:139 [inline] vfs_fstat+0x43/0xb0 fs/stat.c:164 __do_sys_newfstat+0x81/0x100 fs/stat.c:404 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 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:1298 [inline] __free_pages_ok+0x476/0xce0 mm/page_alloc.c:1572 unfreeze_partials+0x17c/0x1d0 mm/slub.c:2375 put_cpu_partial+0x13d/0x230 mm/slub.c:2411 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x8e/0xa0 mm/kasan/common.c:438 kasan_slab_alloc include/linux/kasan.h:236 [inline] slab_post_alloc_hook mm/slab.h:524 [inline] slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2921 [inline] __kmalloc+0x1f7/0x330 mm/slub.c:4055 kmalloc include/linux/slab.h:561 [inline] tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x21b/0x400 security/tomoyo/file.c:822 security_inode_getattr+0xcf/0x140 security/security.c:1332 vfs_getattr fs/stat.c:139 [inline] vfs_statx+0x164/0x390 fs/stat.c:207 vfs_fstatat fs/stat.c:225 [inline] vfs_stat include/linux/fs.h:3380 [inline] __do_sys_newstat+0x91/0x110 fs/stat.c:367 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff88802ed8aa00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802ed8aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802ed8ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802ed8ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802ed8ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================