KASAN: use-after-free Read in str_to_user

Status: upstream: reported on 2026/09/17 23:16
Reported-by: syzbot+34211ad3e923957efb3c@syzkaller.appspotmail.com
First crash: 11d, last: 11d
▶ ▼ Similar bugs (4)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in str_to_user input 19 39 2354d 2583d 0/29 auto-closed as invalid on 2020/08/17 19:40
upstream KASAN: slab-use-after-free Read in str_to_user input prio:normal 19 3 161d 204d 0/29 closed as invalid on 2026/05/19 14:07
linux-6.6 KASAN: slab-use-after-free Read in str_to_user 19 1 55d 55d 0/2 upstream: reported on 2026/08/05 01:22
upstream KASAN: slab-use-after-free Read in str_to_user (2) prio:high actionable input 19 87 7d16h 85d 0/29 upstream: reported on 2026/07/06 01:19

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in strlen+0x53/0x60 lib/string.c:502
Read of size 1 at addr ffff888053e93728 by task acpid/3623

CPU: 1 PID: 3623 Comm: acpid Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 strlen+0x53/0x60 lib/string.c:502
 __fortify_strlen include/linux/fortify-string.h:196 [inline]
 str_to_user+0x25/0x80 drivers/input/evdev.c:776
 evdev_do_ioctl drivers/input/evdev.c:-1 [inline]
 evdev_ioctl_handler+0x12d0/0x1f90 drivers/input/evdev.c:1277
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f5b56b87378
Code: 00 00 48 8d 44 24 08 48 89 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 b8 10 00 00 00 c7 44 24 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 07 89 d0 c3 0f 1f 40 00 48 8b 15 49 3a 0d
RSP: 002b:00007fffa7781798 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000000000a RCX: 00007f5b56b87378
RDX: 00007fffa77817c0 RSI: 0000000081004506 RDI: 000000000000000a
RBP: 00007fffa7781910 R08: 0000000000000098 R09: 0000000000000098
R10: 000000000000000c R11: 0000000000000246 R12: 0000000000000040
R13: 00007fffa77817c0 R14: 000055bf0c7ef7fe R15: 00007fffa7781a10
 </TASK>

Allocated by task 14:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 ____kasan_kmalloc mm/kasan/common.c:375 [inline]
 __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384
 kmalloc include/linux/slab.h:563 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 redrat3_dev_probe+0x3ef/0x23c0 drivers/media/rc/redrat3.c:1025
 usb_probe_interface+0x6e7/0xcf0 drivers/usb/core/driver.c:395
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x24a/0xb40 drivers/base/dd.c:638
 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034
 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
 device_add+0xbcf/0x1050 drivers/base/core.c:3712
 usb_set_configuration+0x19d5/0x2030 drivers/usb/core/message.c:2223
 usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x126/0x250 drivers/usb/core/driver.c:291
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x24a/0xb40 drivers/base/dd.c:638
 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034
 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
 device_add+0xbcf/0x1050 drivers/base/core.c:3712
 usb_new_device+0xa01/0x15e0 drivers/usb/core/hub.c:2664
 hub_port_connect drivers/usb/core/hub.c:5522 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5662 [inline]
 port_event drivers/usb/core/hub.c:5822 [inline]
 hub_event+0x2b2f/0x5200 drivers/usb/core/hub.c:5904
 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Freed by task 14:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1729 [inline]
 slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1755
 slab_free mm/slub.c:3687 [inline]
 __kmem_cache_free+0xb6/0x200 mm/slub.c:3700
 redrat3_delete drivers/media/rc/redrat3.c:466 [inline]
 redrat3_dev_probe+0x1b69/0x23c0 drivers/media/rc/redrat3.c:1126
 usb_probe_interface+0x6e7/0xcf0 drivers/usb/core/driver.c:395
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x24a/0xb40 drivers/base/dd.c:638
 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034
 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
 device_add+0xbcf/0x1050 drivers/base/core.c:3712
 usb_set_configuration+0x19d5/0x2030 drivers/usb/core/message.c:2223
 usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x126/0x250 drivers/usb/core/driver.c:291
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x24a/0xb40 drivers/base/dd.c:638
 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034
 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
 device_add+0xbcf/0x1050 drivers/base/core.c:3712
 usb_new_device+0xa01/0x15e0 drivers/usb/core/hub.c:2664
 hub_port_connect drivers/usb/core/hub.c:5522 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5662 [inline]
 port_event drivers/usb/core/hub.c:5822 [inline]
 hub_event+0x2b2f/0x5200 drivers/usb/core/hub.c:5904
 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the object at ffff888053e93000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1832 bytes inside of
 2048-byte region [ffff888053e93000, ffff888053e93800)

The buggy address belongs to the physical page:
page:ffffea00014fa400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x53e90
head:ffffea00014fa400 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea000536a200 dead000000000002 ffff888017442000
raw: 0000000000000000 0000000000080008 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 4324, tgid 4324 (kworker/0:4), ts 85160835403, free_ts 24658713875
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560
 prep_new_page mm/page_alloc.c:2567 [inline]
 get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658
 alloc_slab_page+0x5d/0x180 mm/slub.c:1799
 allocate_slab mm/slub.c:1944 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:1997
 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3154
 __slab_alloc mm/slub.c:3240 [inline]
 slab_alloc_node mm/slub.c:3325 [inline]
 __kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3398
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc_node_track_caller+0xa0/0x240 mm/slab_common.c:956
 kmalloc_reserve net/core/skbuff.c:446 [inline]
 __alloc_skb+0x226/0x7d0 net/core/skbuff.c:515
 alloc_skb include/linux/skbuff.h:1303 [inline]
 mld_newpack+0x12d/0xc10 net/ipv6/mcast.c:1773
 add_grhead net/ipv6/mcast.c:1884 [inline]
 add_grec+0x1466/0x19c0 net/ipv6/mcast.c:2023
 mld_send_initial_cr+0x148/0x2d0 net/ipv6/mcast.c:2268
 mld_dad_work+0x39/0x1d0 net/ipv6/mcast.c:2294
 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1487 [inline]
 free_pcp_prepare mm/page_alloc.c:1537 [inline]
 free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509
 free_contig_range+0x9d/0x150 mm/page_alloc.c:9498
 destroy_args+0xef/0xa0e mm/debug_vm_pgtable.c:1031
 debug_vm_pgtable+0x33c/0x38e mm/debug_vm_pgtable.c:1359
 do_one_initcall+0x257/0x800 init/main.c:1270
 do_initcall_level+0x13d/0x1ed init/main.c:1343
 do_initcalls+0x4b/0x8a init/main.c:1359
 kernel_init_freeable+0x401/0x5ab init/main.c:1598
 kernel_init+0x19/0x1b0 init/main.c:1486
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Memory state around the buggy address:
 ffff888053e93600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888053e93680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888053e93700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                  ^
 ffff888053e93780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888053e93800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/17 23:16 linux-6.1.y 1a8763b93150 8d7d05f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in str_to_user
* Struck through repros no longer work on HEAD.