syzbot


KASAN: slab-use-after-free Read in kernfs_root

Status: upstream: reported on 2025/06/03 11:10
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+ce1e5a1b4e086b43e56d@syzkaller.appspotmail.com
First crash: 356d, last: 3d20h
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] usb: atm: ueagle-atm: use synchronous request_firmware() 3 (3) 2026/05/18 15:54
[syzbot] [kernfs?] KASAN: slab-use-after-free Read in kernfs_root 0 (1) 2025/06/03 11:10

Sample crash report:
usb 4-1: Falling back to sysfs fallback for: ueagle-atm/eagleI.fw
==================================================================
BUG: KASAN: slab-use-after-free in kernfs_root+0xda/0x230 fs/kernfs/kernfs-internal.h:75
Read of size 8 at addr ffff888058ece4e0 by task kworker/1:7/8617

CPU: 1 UID: 0 PID: 8617 Comm: kworker/1:7 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Workqueue: events request_firmware_work_func
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 kernfs_root+0xda/0x230 fs/kernfs/kernfs-internal.h:75
 kernfs_add_one+0x265/0x5c0 fs/kernfs/dir.c:868
 kernfs_create_dir_ns+0xde/0x130 fs/kernfs/dir.c:1131
 sysfs_create_dir_ns+0x12f/0x2a0 fs/sysfs/dir.c:59
 create_dir lib/kobject.c:73 [inline]
 kobject_add_internal+0x62b/0xd00 lib/kobject.c:240
 kobject_add_varg lib/kobject.c:374 [inline]
 kobject_add+0x163/0x240 lib/kobject.c:426
 class_dir_create_and_add drivers/base/core.c:3234 [inline]
 get_device_parent+0x316/0x3a0 drivers/base/core.c:3285
 device_add+0x2e1/0xbb0 drivers/base/core.c:3615
 fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:86 [inline]
 fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:162 [inline]
 firmware_fallback_sysfs+0x2e4/0xa30 drivers/base/firmware_loader/fallback.c:238
 _request_firmware+0x1052/0x1780 drivers/base/firmware_loader/main.c:898
 request_firmware_work_func+0xaf/0x1c0 drivers/base/firmware_loader/main.c:1150
 process_one_work kernel/workqueue.c:3314 [inline]
 process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3397
 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3478
 kthread+0x389/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Allocated by task 8617:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 unpoison_slab_object mm/kasan/common.c:340 [inline]
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
 kasan_slab_alloc include/linux/kasan.h:253 [inline]
 slab_post_alloc_hook mm/slub.c:4569 [inline]
 slab_alloc_node mm/slub.c:4898 [inline]
 kmem_cache_alloc_noprof+0x2bc/0x650 mm/slub.c:4905
 __kernfs_new_node+0xea/0x970 fs/kernfs/dir.c:664
 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:748
 kernfs_create_dir_ns+0x44/0x130 fs/kernfs/dir.c:1121
 sysfs_create_dir_ns+0x12f/0x2a0 fs/sysfs/dir.c:59
 create_dir lib/kobject.c:73 [inline]
 kobject_add_internal+0x62b/0xd00 lib/kobject.c:240
 kobject_add_varg lib/kobject.c:374 [inline]
 kobject_add+0x163/0x240 lib/kobject.c:426
 class_dir_create_and_add drivers/base/core.c:3234 [inline]
 get_device_parent+0x316/0x3a0 drivers/base/core.c:3285
 device_add+0x2e1/0xbb0 drivers/base/core.c:3615
 fw_load_sysfs_fallback drivers/base/firmware_loader/fallback.c:86 [inline]
 fw_load_from_user_helper drivers/base/firmware_loader/fallback.c:162 [inline]
 firmware_fallback_sysfs+0x2e4/0xa30 drivers/base/firmware_loader/fallback.c:238
 _request_firmware+0x1052/0x1780 drivers/base/firmware_loader/main.c:898
 request_firmware_work_func+0xaf/0x1c0 drivers/base/firmware_loader/main.c:1150
 process_one_work kernel/workqueue.c:3314 [inline]
 process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3397
 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3478
 kthread+0x389/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Freed by task 8620:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
 kasan_slab_free include/linux/kasan.h:235 [inline]
 slab_free_hook mm/slub.c:2689 [inline]
 slab_free mm/slub.c:6250 [inline]
 kmem_cache_free+0x182/0x650 mm/slub.c:6377
 rcu_do_batch kernel/rcu/tree.c:2617 [inline]
 rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869
 handle_softirqs+0x22a/0x840 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0xca/0x220 kernel/softirq.c:735
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1061
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
 __call_rcu_common kernel/rcu/tree.c:3131 [inline]
 call_rcu+0xee/0x890 kernel/rcu/tree.c:3251
 kernfs_put+0x259/0x520 fs/kernfs/dir.c:618
 __kernfs_remove+0x69a/0x8e0 fs/kernfs/dir.c:1604
 kernfs_remove+0x4c/0x80 fs/kernfs/dir.c:1625
 __kobject_del+0xe1/0x330 lib/kobject.c:604
 kobject_del+0x45/0x60 lib/kobject.c:627
 device_del+0x775/0x8f0 drivers/base/core.c:3915
 usb_disconnect+0x615/0x990 drivers/usb/core/hub.c:2376
 hub_port_connect drivers/usb/core/hub.c:5407 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5707 [inline]
 port_event drivers/usb/core/hub.c:5871 [inline]
 hub_event+0x1cc9/0x4f30 drivers/usb/core/hub.c:5953
 process_one_work kernel/workqueue.c:3314 [inline]
 process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3397
 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3478
 kthread+0x389/0x470 kernel/kthread.c:436
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

The buggy address belongs to the object at ffff888058ece4b0
 which belongs to the cache kernfs_node_cache of size 176
The buggy address is located 48 bytes inside of
 freed 176-byte region [ffff888058ece4b0, ffff888058ece560)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x58ece
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff8881404138c0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800110011 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5646, tgid 5646 (syz-executor), ts 82997335324, free_ts 27802467444
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858
 prep_new_page mm/page_alloc.c:1866 [inline]
 get_page_from_freelist+0x24ba/0x2540 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226
 alloc_slab_page mm/slub.c:3278 [inline]
 allocate_slab+0x77/0x660 mm/slub.c:3467
 new_slab mm/slub.c:3525 [inline]
 refill_objects+0x339/0x3d0 mm/slub.c:7271
 refill_sheaf mm/slub.c:2816 [inline]
 __pcs_replace_empty_main+0x321/0x720 mm/slub.c:4651
 alloc_from_pcs mm/slub.c:4749 [inline]
 slab_alloc_node mm/slub.c:4883 [inline]
 kmem_cache_alloc_noprof+0x37d/0x650 mm/slub.c:4905
 __kernfs_new_node+0xea/0x970 fs/kernfs/dir.c:664
 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:748
 kernfs_create_dir_ns+0x44/0x130 fs/kernfs/dir.c:1121
 internal_create_group+0x425/0x1180 fs/sysfs/group.c:176
 dpm_sysfs_add+0x6a/0x270 drivers/base/power/sysfs.c:699
 device_add+0x4d8/0xbb0 drivers/base/core.c:3651
 netdev_register_kobject+0x178/0x310 net/core/net-sysfs.c:2343
 register_netdevice+0x1456/0x1ec0 net/core/dev.c:11423
 veth_newlink+0x67b/0xb70 drivers/net/veth.c:1890
page last free pid 1 tgid 1 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1402 [inline]
 __free_frozen_pages+0xbc7/0xd30 mm/page_alloc.c:2943
 __free_pages mm/page_alloc.c:5345 [inline]
 free_contig_range+0xb7/0x100 mm/page_alloc.c:7313
 destroy_args+0x4e5/0x570 mm/debug_vm_pgtable.c:993
 debug_vm_pgtable+0x3f8/0x410 mm/debug_vm_pgtable.c:1368
 do_one_initcall+0x250/0x870 init/main.c:1392
 do_initcall_level+0x104/0x190 init/main.c:1454
 do_initcalls+0x59/0xa0 init/main.c:1470
 kernel_init_freeable+0x2a6/0x3e0 init/main.c:1703
 kernel_init+0x1d/0x1d0 init/main.c:1593
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Memory state around the buggy address:
 ffff888058ece380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
 ffff888058ece400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
>ffff888058ece480: fc fc fc fc fc fc fa fb fb fb fb fb fb fb fb fb
                                                       ^
 ffff888058ece500: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
 ffff888058ece580: fc fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/05/17 08:56 upstream 6916d5703ddf de5aae85 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in kernfs_root
2026/03/25 22:00 upstream bbeb83d3182a 4367a094 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: slab-use-after-free Read in kernfs_root
2025/12/26 12:02 upstream ccd1cdca5cd4 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in kernfs_root
2025/09/16 20:29 upstream 46a51f4f5eda e2beed91 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in kernfs_root
2025/05/29 12:42 upstream 90b83efa6701 3d2f584d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in kernfs_root
2026/05/15 07:05 linux-next e98d21c170b0 6ccb967e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce KASAN: slab-use-after-free Read in kernfs_root
2026/03/05 07:58 upstream ecc64d2dc9ff a9fe5c9e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in kernfs_root
2025/12/04 17:33 upstream 559e608c4655 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in kernfs_root
2025/11/29 16:07 upstream 19eef1d98eed d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in kernfs_root
2025/11/13 05:20 upstream e927c520e1ba 07e030de .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in kernfs_root
2025/11/08 01:16 upstream 38a2c275c3d3 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in kernfs_root
2025/10/11 20:30 upstream 0739473694c4 ff1712fe .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in kernfs_root
2025/09/30 00:04 upstream e5f0a698b34e 86341da6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: global-out-of-bounds Read in kernfs_root
2025/09/30 00:04 upstream e5f0a698b34e 86341da6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root general protection fault in kernfs_root
2025/09/27 15:43 upstream fec734e8d564 001c9061 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: global-out-of-bounds Read in kernfs_root
2025/09/21 11:32 upstream f975f08c2e89 67c37560 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root KASAN: global-out-of-bounds Read in kernfs_root
2025/09/20 07:45 upstream cd89d487374c 67c37560 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in kernfs_root
2025/08/04 05:29 upstream 3c4a063b1f8a 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in kernfs_root
2025/07/20 12:45 upstream f4a40a4282f4 7117feec .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root general protection fault in kernfs_root
2025/12/03 17:50 upstream 3f9f0252130e d1b870e1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: global-out-of-bounds Read in kernfs_root
2025/11/28 23:45 upstream e538109ac71d d1b870e1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: slab-out-of-bounds Read in kernfs_root
2025/10/15 01:05 upstream 9b332cece987 b6605ba8 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in kernfs_root
2025/08/14 07:19 upstream 91325f31afc1 22ec1469 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream KASAN: global-out-of-bounds Read in kernfs_root
2025/07/27 22:07 upstream b711733e89a3 fb8f743d .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream general protection fault in kernfs_root
2025/12/03 14:38 upstream 44fc84337b6e d1b870e1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in kernfs_root
2025/11/29 07:52 upstream 19eef1d98eed d1b870e1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in kernfs_root
2025/11/06 08:24 upstream dc77806cf3b4 a6c9c731 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in kernfs_root
2025/09/11 07:53 upstream 7aac71907bde fdeaa69b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in kernfs_root
2025/08/21 21:27 upstream 32b7144f806e 3e79b825 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in kernfs_root
2025/08/21 03:51 upstream 41cd3fd15263 0b9605c8 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 general protection fault in kernfs_root
2025/08/20 11:46 upstream b19a97d57c15 bd178e57 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 KASAN: slab-out-of-bounds Read in kernfs_root
2025/09/25 15:37 linux-next b5a4da2c459f 0abd0691 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: global-out-of-bounds Read in kernfs_root
2025/07/18 07:55 linux-next 024e09e444bd 0d1223f1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root KASAN: global-out-of-bounds Read in kernfs_root
* Struck through repros no longer work on HEAD.