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+0x2ea/0x370 drivers/media/rc/rc-ir-raw.c:80
Read of size 4 at addr ffff888111958018 by task udevd/11035
CPU: 1 PID: 11035 Comm: udevd Not tainted 6.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:475
kasan_report+0xda/0x110 mm/kasan/report.c:588
ir_raw_event_store+0x2ea/0x370 drivers/media/rc/rc-ir-raw.c:80
ir_raw_event_store_with_filter+0x403/0x590 drivers/media/rc/rc-ir-raw.c:183
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+0x359/0x5c0 drivers/usb/core/hcd.c:1650
usb_hcd_giveback_urb+0x389/0x430 drivers/usb/core/hcd.c:1733
dummy_timer+0x1415/0x35f0 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x1a0/0x580 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x764/0xb10 kernel/time/timer.c:2022
run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035
__do_softirq+0x20b/0x94e kernel/softirq.c:553
invoke_softirq kernel/softirq.c:427 [inline]
__irq_exit_rcu kernel/softirq.c:632 [inline]
irq_exit_rcu+0xa7/0x110 kernel/softirq.c:644
sysvec_apic_timer_interrupt+0x8e/0xb0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:stack_trace_consume_entry+0x96/0x160 kernel/stacktrace.c:89
Code: 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 90 00 00 00 8b 43 0c <85> c0 75 53 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 80
RSP: 0018:ffffc900041f79a0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffc900041f7a88 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff81a4599c RDI: ffffc900041f7a94
RBP: 0000000000000005 R08: 0000000000000007 R09: 0000000000000000
R10: ffffffff81a4599c R11: 0000000000000000 R12: ffffc900041f79c8
R13: ffffffff813b4cb0 R14: ffffc900041f7a88 R15: ffff88811c123a00
arch_stack_walk+0xde/0x170 arch/x86/kernel/stacktrace.c:27
stack_trace_save+0x96/0xd0 kernel/stacktrace.c:122
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
__kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3478 [inline]
slab_alloc mm/slub.c:3486 [inline]
__kmem_cache_alloc_lru mm/slub.c:3493 [inline]
kmem_cache_alloc+0x188/0x370 mm/slub.c:3502
getname_flags.part.0+0x50/0x4d0 fs/namei.c:140
getname_flags+0x9c/0xf0 include/linux/audit.h:321
user_path_at_empty+0x2c/0x60 fs/namei.c:2909
do_readlinkat+0xdd/0x2f0 fs/stat.c:533
__do_sys_readlink fs/stat.c:566 [inline]
__se_sys_readlink fs/stat.c:563 [inline]
__x64_sys_readlink+0x78/0xb0 fs/stat.c:563
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f5a2916ad47
Code: 73 01 c3 48 8b 0d e1 90 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 59 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d b1 90 0d 00 f7 d8 64 89 01 48
RSP: 002b:00007ffe7bff2538 EFLAGS: 00000206 ORIG_RAX: 0000000000000059
RAX: ffffffffffffffda RBX: 00005574f80a22b0 RCX: 00007f5a2916ad47
RDX: 0000000000000400 RSI: 00007ffe7bff2948 RDI: 00007ffe7bff2548
RBP: 00007ffe7bff2d88 R08: 00005574f63951fd R09: 0000000000000000
R10: 0000000000000010 R11: 0000000000000206 R12: 0000000000000200
R13: 00007ffe7bff2948 R14: 00007ffe7bff2548 R15: 00005574f638fa04
Allocated by task 587:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x87/0x90 mm/kasan/common.c:383
kmalloc include/linux/slab.h:599 [inline]
kzalloc include/linux/slab.h:720 [inline]
ir_raw_event_prepare+0x5a/0x320 drivers/media/rc/rc-ir-raw.c:617
rc_register_device+0x1517/0x1bd0 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+0x307/0x930 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:579 [inline]
really_probe+0x234/0xc90 drivers/base/dd.c:658
__driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:830
__device_attach_driver+0x1d4/0x300 drivers/base/dd.c:958
bus_for_each_drv+0x157/0x1d0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030
bus_probe_device+0x17c/0x1c0 drivers/base/bus.c:532
device_add+0x1182/0x1ac0 drivers/base/core.c:3622
usb_set_configuration+0x10cb/0x1c40 drivers/usb/core/message.c:2207
usb_generic_driver_probe+0xca/0x130 drivers/usb/core/generic.c:238
usb_probe_device+0xda/0x2c0 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:579 [inline]
really_probe+0x234/0xc90 drivers/base/dd.c:658
__driver_probe_device+0x1de/0x4b0 drivers/base/dd.c:800
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:830
__device_attach_driver+0x1d4/0x300 drivers/base/dd.c:958
bus_for_each_drv+0x157/0x1d0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030
bus_probe_device+0x17c/0x1c0 drivers/base/bus.c:532
device_add+0x1182/0x1ac0 drivers/base/core.c:3622
usb_new_device+0xd80/0x1960 drivers/usb/core/hub.c:2589
hub_port_connect drivers/usb/core/hub.c:5440 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5580 [inline]
port_event drivers/usb/core/hub.c:5740 [inline]
hub_event+0x2e62/0x4f30 drivers/usb/core/hub.c:5822
process_one_work+0x887/0x15d0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8bb/0x1290 kernel/workqueue.c:2784
kthread+0x33a/0x430 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Freed by task 5304:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x13c/0x190 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook mm/slub.c:1826 [inline]
slab_free mm/slub.c:3809 [inline]
__kmem_cache_free+0xff/0x330 mm/slub.c:3822
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+0x2e3/0x400 drivers/media/rc/rc-ir-raw.c:676
rc_unregister_device+0x35c/0x410 drivers/media/rc/rc-main.c:2022
streamzap_disconnect+0xa6/0x1f0 drivers/media/rc/streamzap.c:388
usb_unbind_interface+0x1dd/0x8d0 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:569 [inline]
device_remove+0x11f/0x170 drivers/base/dd.c:561
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1295
bus_remove_device+0x22c/0x420 drivers/base/bus.c:574
device_del+0x39a/0xa50 drivers/base/core.c:3811
usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1416
usb_disconnect+0x2e1/0x890 drivers/usb/core/hub.c:2252
hub_port_connect drivers/usb/core/hub.c:5280 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5580 [inline]
port_event drivers/usb/core/hub.c:5740 [inline]
hub_event+0x1be0/0x4f30 drivers/usb/core/hub.c:5822
process_one_work+0x887/0x15d0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8bb/0x1290 kernel/workqueue.c:2784
kthread+0x33a/0x430 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
The buggy address belongs to the object at ffff888111958000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 24 bytes inside of
freed 8192-byte region [ffff888111958000, ffff88811195a000)
The buggy address belongs to the physical page:
page:ffffea0004465600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x111958
head:ffffea0004465600 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x200000000000840(slab|head|node=0|zone=2)
page_type: 0xffffffff()
raw: 0200000000000840 ffff888100042280 ffffea000505d800 dead000000000003
raw: 0000000000000000 0000000080020002 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 0x1d28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 2424, tgid 2424 (dhcpcd), ts 607858226855, free_ts 603062543103
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536
prep_new_page mm/page_alloc.c:1543 [inline]
get_page_from_freelist+0x10e1/0x2fd0 mm/page_alloc.c:3170
__alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426
alloc_pages+0x1a9/0x270 mm/mempolicy.c:2298
alloc_slab_page mm/slub.c:1870 [inline]
allocate_slab+0x251/0x380 mm/slub.c:2017
new_slab mm/slub.c:2070 [inline]
___slab_alloc+0x8be/0x1570 mm/slub.c:3223
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322
__slab_alloc_node mm/slub.c:3375 [inline]
slab_alloc_node mm/slub.c:3468 [inline]
__kmem_cache_alloc_node+0x132/0x310 mm/slub.c:3517
__do_kmalloc_node mm/slab_common.c:1022 [inline]
__kmalloc_node_track_caller+0x50/0x100 mm/slab_common.c:1043
kmalloc_reserve+0xef/0x260 net/core/skbuff.c:581
__alloc_skb+0x12b/0x330 net/core/skbuff.c:650
alloc_skb include/linux/skbuff.h:1286 [inline]
netlink_dump+0x2e5/0xca0 net/netlink/af_netlink.c:2233
__netlink_dump_start+0x6c8/0x9c0 net/netlink/af_netlink.c:2372
netlink_dump_start include/linux/netlink.h:336 [inline]
rtnetlink_rcv_msg+0x755/0xd30 net/core/rtnetlink.c:6400
netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545
netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline]
netlink_unicast+0x536/0x810 net/netlink/af_netlink.c:1368
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1136 [inline]
free_unref_page_prepare+0x460/0xa20 mm/page_alloc.c:2312
free_unref_page+0x33/0x2c0 mm/page_alloc.c:2405
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x18b/0x1d0 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x4a/0x70 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3478 [inline]
slab_alloc mm/slub.c:3486 [inline]
__kmem_cache_alloc_lru mm/slub.c:3493 [inline]
kmem_cache_alloc+0x188/0x370 mm/slub.c:3502
getname_flags.part.0+0x50/0x4d0 fs/namei.c:140
getname_flags include/linux/audit.h:321 [inline]
getname+0x90/0xe0 fs/namei.c:219
do_sys_openat2+0x100/0x1e0 fs/open.c:1416
do_sys_open fs/open.c:1437 [inline]
__do_sys_openat fs/open.c:1453 [inline]
__se_sys_openat fs/open.c:1448 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1448
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Memory state around the buggy address:
ffff888111957f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888111957f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888111958000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888111958080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888111958100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 6 bytes skipped:
0: df 48 89 fisttps -0x77(%rax)
3: fa cli
4: 48 c1 ea 03 shr $0x3,%rdx
8: 0f b6 14 02 movzbl (%rdx,%rax,1),%edx
c: 48 89 f8 mov %rdi,%rax
f: 83 e0 07 and $0x7,%eax
12: 83 c0 03 add $0x3,%eax
15: 38 d0 cmp %dl,%al
17: 7c 08 jl 0x21
19: 84 d2 test %dl,%dl
1b: 0f 85 90 00 00 00 jne 0xb1
21: 8b 43 0c mov 0xc(%rbx),%eax
* 24: 85 c0 test %eax,%eax <-- trapping instruction
26: 75 53 jne 0x7b
28: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
2f: fc ff df
32: 48 89 da mov %rbx,%rdx
35: 48 c1 ea 03 shr $0x3,%rdx
39: 80 .byte 0x80