radio-si470x 1-1:0.0: non-zero urb status (-71) ================================================================== BUG: KASAN: use-after-free in si470x_int_in_callback+0x18b/0x13f0 drivers/media/radio/si470x/radio-si470x-usb.c:378 Read of size 8 at addr ffff888026afcb40 by task kworker/1:2/4548 CPU: 1 PID: 4548 Comm: kworker/1:2 Not tainted 5.13.0-rc4-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+0x202/0x31e lib/dump_stack.c:120 print_address_description+0x5f/0x3b0 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report+0x15c/0x200 mm/kasan/report.c:436 si470x_int_in_callback+0x18b/0x13f0 drivers/media/radio/si470x/radio-si470x-usb.c:378 __usb_hcd_giveback_urb+0x375/0x520 drivers/usb/core/hcd.c:1656 dummy_timer+0x808/0x3100 drivers/usb/gadget/udc/dummy_hcd.c:1978 call_timer_fn+0xf6/0x210 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers+0x6ff/0x910 kernel/time/timer.c:1745 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1758 __do_softirq+0x372/0x7a6 kernel/softirq.c:559 invoke_softirq kernel/softirq.c:433 [inline] __irq_exit_rcu+0x245/0x280 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647 RIP: 0010:console_unlock+0xb2b/0xec0 kernel/printk/printk.c:2653 Code: 75 1d e8 28 b9 19 00 f6 44 24 0f 01 75 1e e8 1c b9 19 00 e9 54 f7 ff ff 0f 1f 80 00 00 00 00 e8 0b b9 19 00 fb f6 44 24 0f 01 <74> e2 e8 fe b8 19 00 48 c7 c7 78 ef f5 8b be 5e 0a 00 00 31 d2 e8 RSP: 0018:ffffc9000a8766e0 EFLAGS: 00000246 RAX: ffffffff816551e5 RBX: ffffc9000a8768a0 RCX: ffff888028f43880 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000a876930 R08: ffffffff816551a4 R09: fffffbfff204dbb1 R10: fffffbfff204dbb1 R11: 0000000000000000 R12: dffffc0000000000 R13: 1ffffffff1af5259 R14: 1ffffffff1af5252 R15: ffffffff8d7a92c8 vprintk_emit+0x21a/0x2f0 kernel/printk/printk.c:2174 vprintk+0x30d/0x370 kernel/printk/printk_safe.c:392 printk+0xc0/0x108 kernel/printk/printk.c:2216 really_probe+0xcce/0x1020 drivers/base/dd.c:667 driver_probe_device+0x178/0x350 drivers/base/dd.c:763 bus_for_each_drv+0x16a/0x1f0 drivers/base/bus.c:431 __device_attach+0x301/0x560 drivers/base/dd.c:938 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491 device_add+0x11fc/0x1670 drivers/base/core.c:3324 usb_set_configuration+0x1a86/0x2100 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0x83/0x140 drivers/usb/core/generic.c:238 usb_probe_device+0x13a/0x260 drivers/usb/core/driver.c:293 really_probe+0x3cb/0x1020 drivers/base/dd.c:580 driver_probe_device+0x178/0x350 drivers/base/dd.c:763 bus_for_each_drv+0x16a/0x1f0 drivers/base/bus.c:431 __device_attach+0x301/0x560 drivers/base/dd.c:938 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491 device_add+0x11fc/0x1670 drivers/base/core.c:3324 usb_new_device+0xd45/0x1790 drivers/usb/core/hub.c:2556 hub_port_connect+0x1055/0x27a0 drivers/usb/core/hub.c:5276 hub_port_connect_change+0x5d0/0xbf0 drivers/usb/core/hub.c:5416 port_event+0xaee/0x1140 drivers/usb/core/hub.c:5562 hub_event+0x48d/0xd90 drivers/usb/core/hub.c:5644 process_one_work+0x833/0x10c0 kernel/workqueue.c:2276 worker_thread+0xac1/0x1300 kernel/workqueue.c:2422 kthread+0x39a/0x3c0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 4548: 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:428 [inline] ____kasan_kmalloc+0xc4/0xf0 mm/kasan/common.c:507 kasan_kmalloc include/linux/kasan.h:246 [inline] kmem_cache_alloc_trace+0x96/0x340 mm/slub.c:2940 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:686 [inline] si470x_usb_driver_probe+0x5a/0x2240 drivers/media/radio/si470x/radio-si470x-usb.c:573 usb_probe_interface+0x633/0xb40 drivers/usb/core/driver.c:396 really_probe+0x3cb/0x1020 drivers/base/dd.c:580 driver_probe_device+0x178/0x350 drivers/base/dd.c:763 bus_for_each_drv+0x16a/0x1f0 drivers/base/bus.c:431 __device_attach+0x301/0x560 drivers/base/dd.c:938 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491 device_add+0x11fc/0x1670 drivers/base/core.c:3324 usb_set_configuration+0x1a86/0x2100 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0x83/0x140 drivers/usb/core/generic.c:238 usb_probe_device+0x13a/0x260 drivers/usb/core/driver.c:293 really_probe+0x3cb/0x1020 drivers/base/dd.c:580 driver_probe_device+0x178/0x350 drivers/base/dd.c:763 bus_for_each_drv+0x16a/0x1f0 drivers/base/bus.c:431 __device_attach+0x301/0x560 drivers/base/dd.c:938 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491 device_add+0x11fc/0x1670 drivers/base/core.c:3324 usb_new_device+0xd45/0x1790 drivers/usb/core/hub.c:2556 hub_port_connect+0x1055/0x27a0 drivers/usb/core/hub.c:5276 hub_port_connect_change+0x5d0/0xbf0 drivers/usb/core/hub.c:5416 port_event+0xaee/0x1140 drivers/usb/core/hub.c:5562 hub_event+0x48d/0xd90 drivers/usb/core/hub.c:5644 process_one_work+0x833/0x10c0 kernel/workqueue.c:2276 worker_thread+0xac1/0x1300 kernel/workqueue.c:2422 kthread+0x39a/0x3c0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Freed by task 4548: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:357 ____kasan_slab_free+0x109/0x150 mm/kasan/common.c:360 kasan_slab_free include/linux/kasan.h:212 [inline] slab_free_hook mm/slub.c:1582 [inline] slab_free_freelist_hook+0x1d8/0x290 mm/slub.c:1607 slab_free mm/slub.c:3167 [inline] kfree+0xcf/0x2d0 mm/slub.c:4217 si470x_usb_driver_probe+0x60d/0x2240 drivers/media/radio/si470x/radio-si470x-usb.c:766 usb_probe_interface+0x633/0xb40 drivers/usb/core/driver.c:396 really_probe+0x3cb/0x1020 drivers/base/dd.c:580 driver_probe_device+0x178/0x350 drivers/base/dd.c:763 bus_for_each_drv+0x16a/0x1f0 drivers/base/bus.c:431 __device_attach+0x301/0x560 drivers/base/dd.c:938 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491 device_add+0x11fc/0x1670 drivers/base/core.c:3324 usb_set_configuration+0x1a86/0x2100 drivers/usb/core/message.c:2164 usb_generic_driver_probe+0x83/0x140 drivers/usb/core/generic.c:238 usb_probe_device+0x13a/0x260 drivers/usb/core/driver.c:293 really_probe+0x3cb/0x1020 drivers/base/dd.c:580 driver_probe_device+0x178/0x350 drivers/base/dd.c:763 bus_for_each_drv+0x16a/0x1f0 drivers/base/bus.c:431 __device_attach+0x301/0x560 drivers/base/dd.c:938 bus_probe_device+0xb8/0x1f0 drivers/base/bus.c:491 device_add+0x11fc/0x1670 drivers/base/core.c:3324 usb_new_device+0xd45/0x1790 drivers/usb/core/hub.c:2556 hub_port_connect+0x1055/0x27a0 drivers/usb/core/hub.c:5276 hub_port_connect_change+0x5d0/0xbf0 drivers/usb/core/hub.c:5416 port_event+0xaee/0x1140 drivers/usb/core/hub.c:5562 hub_event+0x48d/0xd90 drivers/usb/core/hub.c:5644 process_one_work+0x833/0x10c0 kernel/workqueue.c:2276 worker_thread+0xac1/0x1300 kernel/workqueue.c:2422 kthread+0x39a/0x3c0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff888026afc000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 2880 bytes inside of 4096-byte region [ffff888026afc000, ffff888026afd000) The buggy address belongs to the page: page:ffffea00009abe00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x26af8 head:ffffea00009abe00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888011842140 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6353, ts 38579412789, free_ts 38564010053 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x779/0xa20 mm/page_alloc.c:3994 __alloc_pages+0x26c/0x5f0 mm/page_alloc.c:5200 alloc_slab_page mm/slub.c:1645 [inline] allocate_slab+0xf1/0x5b0 mm/slub.c:1785 new_slab mm/slub.c:1848 [inline] new_slab_objects mm/slub.c:2594 [inline] ___slab_alloc+0x1cf/0x350 mm/slub.c:2757 __slab_alloc mm/slub.c:2797 [inline] slab_alloc_node mm/slub.c:2879 [inline] slab_alloc mm/slub.c:2921 [inline] kmem_cache_alloc_trace+0x2a3/0x340 mm/slub.c:2938 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:686 [inline] kobject_uevent_env+0x27e/0x1700 lib/kobject_uevent.c:524 kobject_synth_uevent+0x3bf/0x900 lib/kobject_uevent.c:208 uevent_store+0x20/0x60 drivers/base/core.c:2370 kernfs_fop_write_iter+0x3b6/0x510 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2114 [inline] new_sync_write fs/read_write.c:518 [inline] vfs_write+0xa39/0xc90 fs/read_write.c:605 ksys_write+0x171/0x2a0 fs/read_write.c:658 do_syscall_64+0x3f/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+0x10a5/0x1180 mm/page_alloc.c:1572 free_slab mm/slub.c:1888 [inline] discard_slab mm/slub.c:1894 [inline] unfreeze_partials+0x18c/0x1e0 mm/slub.c:2375 put_cpu_partial+0xd2/0x210 mm/slub.c:2411 __slab_free+0x3a8/0x6b0 mm/slub.c:3061 do_slab_free mm/slub.c:3155 [inline] ___cache_free+0xfc/0x120 mm/slub.c:3174 qlist_free_all mm/kasan/quarantine.c:165 [inline] kasan_quarantine_reduce+0x151/0x1c0 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x2f/0xd0 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] kmem_cache_alloc+0x1d7/0x340 mm/slub.c:2926 prepare_creds+0x3d/0x5f0 kernel/cred.c:258 access_override_creds fs/open.c:355 [inline] do_faccessat+0xd2/0x910 fs/open.c:419 do_syscall_64+0x3f/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff888026afca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888026afca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888026afcb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888026afcb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888026afcc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================