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+0x324/0x370 drivers/media/rc/rc-ir-raw.c:80
Read of size 8 at addr ffff88813b0b50d8 by task udevd/20469
CPU: 1 PID: 20469 Comm: udevd Not tainted 6.5.0-rc6-syzkaller-00119-gbbb9e06d2c64 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/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+0x324/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_pulse drivers/media/rc/streamzap.c:115 [inline]
sz_push_half_pulse drivers/media/rc/streamzap.c:121 [inline]
streamzap_callback+0x536/0x7e0 drivers/media/rc/streamzap.c:189
__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:1109
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:copy_from_kernel_nofault mm/maccess.c:40 [inline]
RIP: 0010:copy_from_kernel_nofault+0xff/0x240 mm/maccess.c:24
Code: 24 48 83 c5 04 49 83 c4 04 48 83 eb 04 e8 59 8c d3 ff e8 54 8c d3 ff 48 89 de bf 01 00 00 00 e8 d7 87 d3 ff 48 83 fb 01 76 1f 3c 8c d3 ff 66 8b 45 00 66 41 89 04 24 48 83 c5 02 49 83 c4 02
RSP: 0018:ffffc9000151f7c8 EFLAGS: 00000202
RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffff8178bf79
RDX: ffff88811f639d00 RSI: 0000000000000000 RDI: 0000000000000007
RBP: ffff88811224fae8 R08: 0000000000000007 R09: 0000000000000001
R10: 0000000000000003 R11: 0000000000056000 R12: ffff888104ba2fd2
R13: ffff88811f639d00 R14: ffff888104ba2fd5 R15: ffffc9000151f8e8
prepend_copy+0x28/0x70 fs/d_path.c:50
prepend+0xa7/0x130 fs/d_path.c:76
prepend_name fs/d_path.c:101 [inline]
__prepend_path fs/d_path.c:133 [inline]
prepend_path+0x55c/0xf80 fs/d_path.c:172
d_absolute_path+0xff/0x1a0 fs/d_path.c:234
tomoyo_get_absolute_path security/tomoyo/realpath.c:101 [inline]
tomoyo_realpath_from_path+0x35f/0x710 security/tomoyo/realpath.c:271
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x271/0x450 security/tomoyo/file.c:822
security_inode_getattr+0xf1/0x150 security/security.c:2114
vfs_getattr fs/stat.c:167 [inline]
vfs_statx+0x180/0x430 fs/stat.c:242
vfs_fstatat+0x90/0xb0 fs/stat.c:276
__do_sys_newfstatat+0x98/0x110 fs/stat.c:446
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:0x7f4d0b9535f4
Code: 64 c7 00 09 00 00 00 83 c8 ff c3 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 00 00 00 00 41 89 ca b8 06 01 00 00 0f 05 <45> 31 c0 3d 00 f0 ff ff 76 10 48 8b 15 03 a8 0d 00 f7 d8 41 83 c8
RSP: 002b:00007ffd0b656598 EFLAGS: 00000206 ORIG_RAX: 0000000000000106
RAX: ffffffffffffffda RBX: 000055c81a55b100 RCX: 00007f4d0b9535f4
RDX: 00007ffd0b6565a8 RSI: 00007ffd0b656638 RDI: 00000000ffffff9c
RBP: 000055c81a55237f R08: 000055c81a55237f R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000206 R12: 0000000000000000
R13: 000055c81a55b1f0 R14: 00007ffd0b656638 R15: 000055c8188aaa04
Allocated by task 11279:
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:582 [inline]
kzalloc include/linux/slab.h:703 [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:798
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:828
__device_attach_driver+0x1d4/0x300 drivers/base/dd.c:956
bus_for_each_drv+0x157/0x1d0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1028
bus_probe_device+0x17c/0x1c0 drivers/base/bus.c:532
device_add+0x11f1/0x1b40 drivers/base/core.c:3625
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:798
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:828
__device_attach_driver+0x1d4/0x300 drivers/base/dd.c:956
bus_for_each_drv+0x157/0x1d0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1028
bus_probe_device+0x17c/0x1c0 drivers/base/bus.c:532
device_add+0x11f1/0x1b40 drivers/base/core.c:3625
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+0xaa2/0x16f0 kernel/workqueue.c:2600
worker_thread+0x687/0x1110 kernel/workqueue.c:2751
kthread+0x33a/0x430 kernel/kthread.c:389
ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Freed by task 11475:
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+0x13f/0x190 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:162 [inline]
slab_free_hook mm/slub.c:1792 [inline]
slab_free_freelist_hook mm/slub.c:1818 [inline]
slab_free mm/slub.c:3801 [inline]
__kmem_cache_free+0xff/0x340 mm/slub.c:3814
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:1270 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1293
bus_remove_device+0x22c/0x420 drivers/base/bus.c:574
device_del+0x39a/0xa40 drivers/base/core.c:3814
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+0xaa2/0x16f0 kernel/workqueue.c:2600
worker_thread+0x687/0x1110 kernel/workqueue.c:2751
kthread+0x33a/0x430 kernel/kthread.c:389
ret_from_fork+0x2c/0x70 arch/x86/kernel/process.c:145
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
The buggy address belongs to the object at ffff88813b0b4000
which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 4312 bytes inside of
freed 8192-byte region [ffff88813b0b4000, ffff88813b0b6000)
The buggy address belongs to the physical page:
page:ffffea0004ec2c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13b0b0
head:ffffea0004ec2c00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x200000000010200(slab|head|node=0|zone=2)
page_type: 0xffffffff()
raw: 0200000000010200 ffff888100042280 dead000000000122 0000000000000000
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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5297, tgid 5297 (kworker/1:5), ts 1738019815163, free_ts 1737409281993
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570
prep_new_page mm/page_alloc.c:1577 [inline]
get_page_from_freelist+0x10e1/0x2fd0 mm/page_alloc.c:3221
__alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4477
alloc_pages+0x1a9/0x270 mm/mempolicy.c:2292
alloc_slab_page mm/slub.c:1862 [inline]
allocate_slab+0x24e/0x380 mm/slub.c:2009
new_slab mm/slub.c:2062 [inline]
___slab_alloc+0x8bc/0x1570 mm/slub.c:3215
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3314
__slab_alloc_node mm/slub.c:3367 [inline]
slab_alloc_node mm/slub.c:3460 [inline]
__kmem_cache_alloc_node+0x132/0x310 mm/slub.c:3509
__do_kmalloc_node mm/slab_common.c:984 [inline]
__kmalloc+0x4c/0x100 mm/slab_common.c:998
kmalloc include/linux/slab.h:586 [inline]
kzalloc include/linux/slab.h:703 [inline]
snd_card_new+0x74/0x110 sound/core/init.c:176
snd_usb_audio_create sound/usb/card.c:621 [inline]
usb_audio_probe+0x1a4b/0x3bc0 sound/usb/card.c:827
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:798
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:828
__device_attach_driver+0x1d4/0x300 drivers/base/dd.c:956
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1161 [inline]
free_unref_page_prepare+0x4ec/0xb60 mm/page_alloc.c:2348
free_unref_page+0x33/0x2c0 mm/page_alloc.c:2443
__unfreeze_partials+0x21d/0x240 mm/slub.c:2647
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:186 [inline]
slab_post_alloc_hook mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3470 [inline]
slab_alloc mm/slub.c:3478 [inline]
__kmem_cache_alloc_lru mm/slub.c:3485 [inline]
kmem_cache_alloc+0x188/0x370 mm/slub.c:3494
getname_flags.part.0+0x50/0x4d0 fs/namei.c:140
getname_flags include/linux/audit.h:319 [inline]
getname+0x90/0xe0 fs/namei.c:219
do_sys_openat2+0x100/0x1e0 fs/open.c:1401
do_sys_open fs/open.c:1422 [inline]
__do_sys_openat fs/open.c:1438 [inline]
__se_sys_openat fs/open.c:1433 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1433
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:
ffff88813b0b4f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88813b0b5000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88813b0b5080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88813b0b5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88813b0b5180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 24 48 and $0x48,%al
2: 83 c5 04 add $0x4,%ebp
5: 49 83 c4 04 add $0x4,%r12
9: 48 83 eb 04 sub $0x4,%rbx
d: e8 59 8c d3 ff call 0xffd38c6b
12: e8 54 8c d3 ff call 0xffd38c6b
17: 48 89 de mov %rbx,%rsi
1a: bf 01 00 00 00 mov $0x1,%edi
1f: e8 d7 87 d3 ff call 0xffd387fb
24: 48 83 fb 01 cmp $0x1,%rbx
28: 76 1f jbe 0x49
* 2a: e8 3c 8c d3 ff call 0xffd38c6b <-- trapping instruction
2f: 66 8b 45 00 mov 0x0(%rbp),%ax
33: 66 41 89 04 24 mov %ax,(%r12)
38: 48 83 c5 02 add $0x2,%rbp
3c: 49 83 c4 02 add $0x2,%r12