rc rc0: IR event FIFO is full! rc rc0: IR event FIFO is full! rc rc0: IR event FIFO is full! rc rc0: IR event FIFO is full! ================================================================== BUG: KASAN: slab-use-after-free in ir_raw_event_store_with_filter+0x55e/0x590 drivers/media/rc/rc-ir-raw.c:184 Write of size 8 at addr ffff888121ff90d8 by task udevd/2846 CPU: 0 UID: 0 PID: 2846 Comm: udevd Not tainted 6.13.0-rc7-syzkaller-00128-g70cd0576aa39 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xc3/0x620 mm/kasan/report.c:489 kasan_report+0xd9/0x110 mm/kasan/report.c:602 ir_raw_event_store_with_filter+0x55e/0x590 drivers/media/rc/rc-ir-raw.c:184 sz_push+0x97/0x1d0 drivers/media/rc/streamzap.c:104 sz_push_full_space drivers/media/rc/streamzap.c:132 [inline] sz_push_half_space drivers/media/rc/streamzap.c:138 [inline] streamzap_callback+0x57d/0x7e0 drivers/media/rc/streamzap.c:190 __usb_hcd_giveback_urb+0x389/0x6e0 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1734 dummy_timer+0x17f7/0x3960 drivers/usb/gadget/udc/dummy_hcd.c:1994 __run_hrtimer kernel/time/hrtimer.c:1739 [inline] __hrtimer_run_queues+0x20a/0xae0 kernel/time/hrtimer.c:1803 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1820 handle_softirqs+0x206/0x8d0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0xfa/0x160 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:inode_set_mtime_to_ts include/linux/fs.h:1647 [inline] RIP: 0010:setattr_copy_mgtime fs/attr.c:312 [inline] RIP: 0010:setattr_copy+0x88c/0xb40 fs/attr.c:356 Code: ff ff e8 87 e6 96 ff 48 8d 7b 60 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 a6 02 00 00 48 8d 7b 74 <4c> 89 7b 60 44 8b 74 24 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa RSP: 0018:ffffc9000175fb48 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: ffff888114cd53e0 RCX: ffffffff81c483db RDX: 1ffff1102299aa88 RSI: ffffffff81c483e9 RDI: ffff888114cd5454 RBP: ffffc9000175fb80 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000020 R11: 0000000000000002 R12: ffffc9000175fcf8 R13: 0000000000000020 R14: 0000000000000000 R15: 000000006796da66 shmem_setattr+0x67a/0x1120 mm/shmem.c:1262 notify_change+0x6a6/0x1230 fs/attr.c:552 vfs_utimes+0x41d/0x850 fs/utimes.c:66 do_utimes_fd fs/utimes.c:117 [inline] do_utimes+0x212/0x2a0 fs/utimes.c:139 __do_sys_utimensat fs/utimes.c:159 [inline] __se_sys_utimensat fs/utimes.c:143 [inline] __x64_sys_utimensat+0x1c7/0x290 fs/utimes.c:143 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f84ab09dfcc Code: d8 64 89 02 48 83 c8 ff 89 ef 48 89 44 24 08 e8 99 00 fa ff 48 8b 44 24 08 48 83 c4 30 5d c3 c3 41 89 ca b8 18 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 2d 6e 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffc90621eb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000118 RAX: ffffffffffffffda RBX: 000055fe37c2b040 RCX: 00007f84ab09dfcc RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000000000c RBP: 000000000000000c R08: 00000000ffffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: ffffffffffffffff R14: 00000000ffffffff R15: 00000000ffffffff Allocated by task 8: 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:377 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] ir_raw_event_prepare+0x5a/0x320 drivers/media/rc/rc-ir-raw.c:617 rc_register_device+0x1523/0x1be0 drivers/media/rc/rc-main.c:1921 streamzap_init_rc_dev drivers/media/rc/streamzap.c:249 [inline] streamzap_probe+0x805/0x1090 drivers/media/rc/streamzap.c:331 usb_probe_interface+0x300/0x9c0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23e/0xa90 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x440 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+0x157/0x1e0 drivers/base/bus.c:459 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:534 device_add+0x114b/0x1a70 drivers/base/core.c:3665 usb_set_configuration+0x10cb/0x1c50 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250 usb_probe_device+0xec/0x3e0 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23e/0xa90 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x440 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+0x157/0x1e0 drivers/base/bus.c:459 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:534 device_add+0x114b/0x1a70 drivers/base/core.c:3665 usb_new_device+0xd09/0x1a20 drivers/usb/core/hub.c:2652 hub_port_connect drivers/usb/core/hub.c:5523 [inline] hub_port_connect_change drivers/usb/core/hub.c:5663 [inline] port_event drivers/usb/core/hub.c:5823 [inline] hub_event+0x2e58/0x4f40 drivers/usb/core/hub.c:5905 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3398 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Freed by task 36: 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:582 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x37/0x50 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2353 [inline] slab_free mm/slub.c:4613 [inline] kfree+0x130/0x470 mm/slub.c:4761 ir_raw_event_free drivers/media/rc/rc-ir-raw.c:653 [inline] ir_raw_event_free drivers/media/rc/rc-ir-raw.c:648 [inline] ir_raw_event_unregister+0x2e6/0x400 drivers/media/rc/rc-ir-raw.c:676 rc_unregister_device+0x367/0x410 drivers/media/rc/rc-main.c:2022 streamzap_disconnect+0xa6/0x1f0 drivers/media/rc/streamzap.c:388 usb_unbind_interface+0x1e2/0x960 drivers/usb/core/driver.c:458 device_remove drivers/base/dd.c:569 [inline] device_remove+0x122/0x170 drivers/base/dd.c:561 __device_release_driver drivers/base/dd.c:1273 [inline] device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1296 bus_remove_device+0x22f/0x420 drivers/base/bus.c:576 device_del+0x396/0x9f0 drivers/base/core.c:3854 usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1418 usb_disconnect+0x2e1/0x920 drivers/usb/core/hub.c:2305 hub_port_connect drivers/usb/core/hub.c:5363 [inline] hub_port_connect_change drivers/usb/core/hub.c:5663 [inline] port_event drivers/usb/core/hub.c:5823 [inline] hub_event+0x1bed/0x4f40 drivers/usb/core/hub.c:5905 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3317 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3398 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888121ff8000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4312 bytes inside of freed 8192-byte region [ffff888121ff8000, ffff888121ffa000) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x121ff8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888100042280 ffffea000489cc00 0000000000000006 raw: 0000000000000000 0000000080020002 00000001f5000000 0000000000000000 head: 0200000000000040 ffff888100042280 ffffea000489cc00 0000000000000006 head: 0000000000000000 0000000080020002 00000001f5000000 0000000000000000 head: 0200000000000003 ffffea000487fe01 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 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 2950, tgid 2950 (syz-executor), ts 38070293544, free_ts 29870365528 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0xe76/0x2b90 mm/page_alloc.c:3476 __alloc_pages_noprof+0x21c/0x22a0 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0xeb/0x400 mm/mempolicy.c:2269 alloc_slab_page mm/slub.c:2423 [inline] allocate_slab mm/slub.c:2589 [inline] new_slab+0x2c9/0x410 mm/slub.c:2642 ___slab_alloc+0xd1d/0x16e0 mm/slub.c:3830 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3920 __slab_alloc_node mm/slub.c:3995 [inline] slab_alloc_node mm/slub.c:4156 [inline] __kmalloc_cache_noprof+0x217/0x3e0 mm/slub.c:4324 kmalloc_noprof include/linux/slab.h:901 [inline] kzalloc_noprof include/linux/slab.h:1037 [inline] cgroup1_root_to_use kernel/cgroup/cgroup-v1.c:1228 [inline] cgroup1_get_tree+0x936/0xed0 kernel/cgroup/cgroup-v1.c:1255 vfs_get_tree+0x8f/0x380 fs/super.c:1814 do_new_mount fs/namespace.c:3511 [inline] path_mount+0x14e6/0x1f10 fs/namespace.c:3838 do_mount fs/namespace.c:3851 [inline] __do_sys_mount fs/namespace.c:4061 [inline] __se_sys_mount fs/namespace.c:4038 [inline] __x64_sys_mount+0x294/0x320 fs/namespace.c:4038 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 2933 tgid 2933 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x661/0xe40 mm/page_alloc.c:2659 __folio_put+0x1e8/0x2d0 mm/swap.c:112 folio_put include/linux/mm.h:1489 [inline] put_page include/linux/mm.h:1561 [inline] anon_pipe_buf_release+0x36c/0x430 fs/pipe.c:128 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_update_tail fs/pipe.c:224 [inline] pipe_read+0x701/0x1020 fs/pipe.c:344 new_sync_read fs/read_write.c:484 [inline] vfs_read+0xa4c/0xbe0 fs/read_write.c:565 ksys_read+0x207/0x250 fs/read_write.c:708 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888121ff8f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888121ff9000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888121ff9080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888121ff9100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888121ff9180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: e8 87 e6 96 ff call 0xff96e68c 5: 48 8d 7b 60 lea 0x60(%rbx),%rdi 9: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 10: fc ff df 13: 48 89 fa mov %rdi,%rdx 16: 48 c1 ea 03 shr $0x3,%rdx 1a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) 1e: 0f 85 a6 02 00 00 jne 0x2ca 24: 48 8d 7b 74 lea 0x74(%rbx),%rdi * 28: 4c 89 7b 60 mov %r15,0x60(%rbx) <-- trapping instruction 2c: 44 8b 74 24 08 mov 0x8(%rsp),%r14d 31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 38: fc ff df 3b: 48 89 fa mov %rdi,%rdx