syzbot
KASAN: use-after-free Read in seq_printf (3)
Status:
premoderation: reported on 2026/08/30 00:45
Reported-by: syzbot+f36aa1df8927979e175e@syzkaller.appspotmail.com
First crash: 20d, last: 8d02h
Sample crash report:
==================================================================
BUG: KASAN: use-after-free in string_nocheck lib/vsprintf.c:641 [inline]
BUG: KASAN: use-after-free in string+0x20f/0x2a0 lib/vsprintf.c:723
Read of size 1 at addr ffff88812725dd78 by task syz.2.647/2974
CPU: 1 PID: 2974 Comm: syz.2.647 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:77
dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:435 [inline]
kasan_report+0x100/0x140 mm/kasan/report.c:452
__asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
string_nocheck lib/vsprintf.c:641 [inline]
string+0x20f/0x2a0 lib/vsprintf.c:723
vsnprintf+0xec5/0x1990 lib/vsprintf.c:2689
seq_vprintf fs/seq_file.c:398 [inline]
seq_printf+0x185/0x280 fs/seq_file.c:413
input_devices_seq_show+0x14b/0x650 drivers/input/input.c:1184
seq_read_iter+0x908/0xce0 fs/seq_file.c:272
seq_read+0x3d9/0x4f0 fs/seq_file.c:162
pde_read fs/proc/inode.c:321 [inline]
proc_reg_read+0x1c4/0x2b0 fs/proc/inode.c:333
vfs_read+0x209/0xa50 fs/read_write.c:494
ksys_read+0x14a/0x260 fs/read_write.c:634
__do_sys_read fs/read_write.c:644 [inline]
__se_sys_read fs/read_write.c:642 [inline]
__x64_sys_read+0x7b/0x90 fs/read_write.c:642
do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fbaadbf7159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fbaac650028 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007fbaade7efa0 RCX: 00007fbaadbf7159
RDX: 0000000000002020 RSI: 0000200000000300 RDI: 0000000000000005
RBP: 00007fbaadc8e03b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fbaade7f038 R14: 00007fbaade7efa0 R15: 00007fff76b6a448
Allocated by task 274:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:430 [inline]
____kasan_kmalloc mm/kasan/common.c:509 [inline]
__kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:518
kasan_kmalloc include/linux/kasan.h:254 [inline]
kmem_cache_alloc_trace+0x179/0x2e0 mm/slub.c:2979
kmalloc include/linux/slab.h:555 [inline]
kzalloc include/linux/slab.h:667 [inline]
xpad_probe+0x427/0x1d30 drivers/input/joystick/xpad.c:1784
usb_probe_interface+0x60f/0xb20 drivers/usb/core/driver.c:397
really_probe+0x3bf/0xa60 drivers/base/dd.c:562
driver_probe_device+0xe1/0x190 drivers/base/dd.c:752
__device_attach_driver+0x282/0x3f0 drivers/base/dd.c:863
bus_for_each_drv+0x184/0x210 drivers/base/bus.c:433
__device_attach+0x2a8/0x410 drivers/base/dd.c:932
device_initial_probe+0x1a/0x20 drivers/base/dd.c:981
bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:493
device_add+0x8ce/0xc00 drivers/base/core.c:3273
usb_set_configuration+0x1a76/0x1fe0 drivers/usb/core/message.c:2219
usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238
usb_probe_device+0x143/0x250 drivers/usb/core/driver.c:294
really_probe+0x3bf/0xa60 drivers/base/dd.c:562
driver_probe_device+0xe1/0x190 drivers/base/dd.c:752
__device_attach_driver+0x282/0x3f0 drivers/base/dd.c:863
bus_for_each_drv+0x184/0x210 drivers/base/bus.c:433
__device_attach+0x2a8/0x410 drivers/base/dd.c:932
device_initial_probe+0x1a/0x20 drivers/base/dd.c:981
bus_probe_device+0xc0/0x1e0 drivers/base/bus.c:493
device_add+0x8ce/0xc00 drivers/base/core.c:3273
usb_new_device+0x9ba/0x1460 drivers/usb/core/hub.c:2659
hub_port_connect drivers/usb/core/hub.c:5504 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5644 [inline]
port_event drivers/usb/core/hub.c:5810 [inline]
hub_event+0x2790/0x4220 drivers/usb/core/hub.c:5892
process_one_work+0x6fd/0xbc0 kernel/workqueue.c:2301
worker_thread+0xa8e/0x13c0 kernel/workqueue.c:2447
kthread+0x324/0x3b0 kernel/kthread.c:313
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
Freed by task 19:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:362
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:370
kasan_slab_free include/linux/kasan.h:220 [inline]
slab_free_hook mm/slub.c:1600 [inline]
slab_free_freelist_hook+0xc5/0x190 mm/slub.c:1626
slab_free mm/slub.c:3208 [inline]
kfree+0xc0/0x270 mm/slub.c:4196
skb_free_head net/core/skbuff.c:606 [inline]
skb_release_data+0x53b/0x690 net/core/skbuff.c:626
skb_release_all net/core/skbuff.c:680 [inline]
__kfree_skb net/core/skbuff.c:694 [inline]
kfree_skb+0xb9/0x2f0 net/core/skbuff.c:713
ip6_mc_input+0x22b/0x290 net/ipv6/ip6_input.c:574
dst_input include/net/dst.h:461 [inline]
ip6_rcv_finish+0x18c/0x360 net/ipv6/ip6_input.c:80
NF_HOOK include/linux/netfilter.h:299 [inline]
ipv6_rcv+0xf0/0x230 net/ipv6/ip6_input.c:301
__netif_receive_skb_one_core net/core/dev.c:5413 [inline]
__netif_receive_skb+0xc8/0x280 net/core/dev.c:5527
process_backlog+0x351/0x600 net/core/dev.c:6434
napi_poll net/core/dev.c:6885 [inline]
net_rx_action+0x48d/0xed0 net/core/dev.c:6955
__do_softirq+0x255/0x563 kernel/softirq.c:309
Last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
__kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
insert_work+0x51/0x320 kernel/workqueue.c:1352
__queue_work+0x91f/0xca0 kernel/workqueue.c:1518
queue_work_on+0xe6/0x140 kernel/workqueue.c:1545
queue_work include/linux/workqueue.h:515 [inline]
schedule_work include/linux/workqueue.h:576 [inline]
xpad360w_process_packet drivers/input/joystick/xpad.c:853 [inline]
xpad_irq_in+0xd26/0x1a60 drivers/input/joystick/xpad.c:991
__usb_hcd_giveback_urb+0x32f/0x4f0 drivers/usb/core/hcd.c:1672
usb_hcd_giveback_urb+0x11d/0x3f0 drivers/usb/core/hcd.c:1746
dummy_timer+0xa3a/0x32d0 drivers/usb/gadget/udc/dummy_hcd.c:2000
call_timer_fn+0x38/0x290 kernel/time/timer.c:1450
expire_timers kernel/time/timer.c:1495 [inline]
__run_timers+0x637/0x9a0 kernel/time/timer.c:1789
run_timer_softirq+0x6a/0xf0 kernel/time/timer.c:1802
__do_softirq+0x255/0x563 kernel/softirq.c:309
Second to last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
__kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
insert_work+0x51/0x320 kernel/workqueue.c:1352
__queue_work+0x91f/0xca0 kernel/workqueue.c:1518
queue_work_on+0xe6/0x140 kernel/workqueue.c:1545
queue_work include/linux/workqueue.h:515 [inline]
schedule_work include/linux/workqueue.h:576 [inline]
xpad360w_process_packet drivers/input/joystick/xpad.c:853 [inline]
xpad_irq_in+0xd26/0x1a60 drivers/input/joystick/xpad.c:991
__usb_hcd_giveback_urb+0x32f/0x4f0 drivers/usb/core/hcd.c:1672
usb_hcd_giveback_urb+0x11d/0x3f0 drivers/usb/core/hcd.c:1746
dummy_timer+0xa3a/0x32d0 drivers/usb/gadget/udc/dummy_hcd.c:2000
call_timer_fn+0x38/0x290 kernel/time/timer.c:1450
expire_timers kernel/time/timer.c:1495 [inline]
__run_timers+0x637/0x9a0 kernel/time/timer.c:1789
run_timer_softirq+0x6a/0xf0 kernel/time/timer.c:1802
__do_softirq+0x255/0x563 kernel/softirq.c:309
The buggy address belongs to the object at ffff88812725dc00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 376 bytes inside of
512-byte region [ffff88812725dc00, ffff88812725de00)
The buggy address belongs to the page:
page:ffffea00049c9700 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88812725f800 pfn:0x12725c
head:ffffea00049c9700 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head)
raw: 4000000000010200 ffffea000433b808 ffffea00042f0608 ffff888100043080
raw: ffff88812725f800 000000000010000f 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 283, ts 31183771813, free_ts 0
set_page_owner include/linux/page_owner.h:35 [inline]
post_alloc_hook mm/page_alloc.c:2456 [inline]
prep_new_page+0x176/0x190 mm/page_alloc.c:2462
get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254
__alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1813 [inline]
new_slab+0x84/0x3f0 mm/slub.c:1874
new_slab_objects mm/slub.c:2632 [inline]
___slab_alloc+0x2f8/0x4c0 mm/slub.c:2796
__slab_alloc+0x63/0xa0 mm/slub.c:2836
slab_alloc_node mm/slub.c:2918 [inline]
slab_alloc mm/slub.c:2960 [inline]
kmem_cache_alloc_trace+0x1a8/0x2e0 mm/slub.c:2977
kmalloc include/linux/slab.h:555 [inline]
kzalloc include/linux/slab.h:667 [inline]
inetdev_init+0x81/0x490 net/ipv4/devinet.c:259
inetdev_event+0x1f4/0x1010 net/ipv4/devinet.c:1544
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0x90/0x100 kernel/notifier.c:410
call_netdevice_notifiers_info net/core/dev.c:2052 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2064 [inline]
call_netdevice_notifiers+0x119/0x190 net/core/dev.c:2078
register_netdevice+0x100a/0x13a0 net/core/dev.c:10098
veth_newlink+0x854/0xb60 drivers/net/veth.c:1387
__rtnl_newlink net/core/rtnetlink.c:3494 [inline]
rtnl_newlink+0x1307/0x1830 net/core/rtnetlink.c:3542
rtnetlink_rcv_msg+0x9e9/0xca0 net/core/rtnetlink.c:5622
netlink_rcv_skb+0x1e9/0x430 net/netlink/af_netlink.c:2508
page_owner free stack trace missing
Memory state around the buggy address:
ffff88812725dc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88812725dc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88812725dd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88812725dd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88812725de00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 283, ts 31183771813, free_ts 0
page_owner free stack trace missing
* Struck through repros no longer work on HEAD.