* [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
@ 2026-08-12 5:00 ` syzbot
0 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-08-12 5:00 UTC (permalink / raw)
To: dwmw2, linux-kernel, linux-mtd, richard, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: bcc44b6785f2 Merge tag 'drm-fixes-2026-08-08' of https://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=147d7e49580000
kernel config: https://syzkaller.appspot.com/x/.config?x=158601bb8cb292dd
dashboard link: https://syzkaller.appspot.com/bug?extid=3a8099322b09d8d073d1
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e4ca3ce763a0/disk-bcc44b67.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/face1dc3e618/vmlinux-bcc44b67.xz
kernel image: https://storage.googleapis.com/syzbot-assets/185a6a3df821/bzImage-bcc44b67.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3a8099322b09d8d073d1@syzkaller.appspotmail.com
RBP: 00007f5b86286090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f5b882b6038 R14: 00007f5b882b5fa0 R15: 00007ffe7e6b8828
</TASK>
==================================================================
BUG: KASAN: slab-use-after-free in jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
Read of size 4 at addr ffff888029725ee8 by task syz.8.1428/17657
CPU: 0 UID: 0 PID: 17657 Comm: syz.8.1428 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
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
jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
jffs2_do_clear_inode+0x58/0x390 fs/jffs2/readinode.c:1418
evict+0x624/0xb50 fs/inode.c:825
jffs2_new_inode+0x49c/0xd00 fs/jffs2/fs.c:-1
jffs2_mkdir+0x192/0xeb0 fs/jffs2/dir.c:485
vfs_mkdir+0x402/0x620 fs/namei.c:5276
filename_mkdirat+0x289/0x520 fs/namei.c:5309
__do_sys_mkdirat fs/namei.c:5330 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5327
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5b8802e0d9
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:00007f5b86286028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f5b882b5fa0 RCX: 00007f5b8802e0d9
RDX: 0000000000000000 RSI: 0000200000000640 RDI: ffffffffffffff9c
RBP: 00007f5b86286090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f5b882b6038 R14: 00007f5b882b5fa0 R15: 00007ffe7e6b8828
</TASK>
Allocated by task 14460:
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:4584 [inline]
slab_alloc_node mm/slub.c:4917 [inline]
kmem_cache_alloc_noprof+0x355/0x650 mm/slub.c:4931
jffs2_scan_make_ino_cache+0x89/0x1d0 fs/jffs2/scan.c:978
jffs2_scan_dirent_node fs/jffs2/scan.c:1099 [inline]
jffs2_scan_eraseblock fs/jffs2/scan.c:831 [inline]
jffs2_scan_medium+0x2b58/0x70c0 fs/jffs2/scan.c:151
jffs2_build_filesystem fs/jffs2/build.c:112 [inline]
jffs2_do_mount_fs+0x775/0x22c0 fs/jffs2/build.c:416
jffs2_do_fill_super+0x555/0xc50 fs/jffs2/fs.c:574
mtd_get_sb+0x18a/0x410 drivers/mtd/mtdsuper.c:57
mtd_get_sb_by_nr drivers/mtd/mtdsuper.c:88 [inline]
get_tree_mtd+0x4bd/0x7d0 drivers/mtd/mtdsuper.c:158
vfs_get_tree+0x92/0x2a0 fs/super.c:1700
fc_mount fs/namespace.c:1198 [inline]
do_new_mount_fc fs/namespace.c:3765 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3841
do_mount fs/namespace.c:4174 [inline]
__do_sys_mount fs/namespace.c:4390 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4367
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 7915:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/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:2677 [inline]
slab_free mm/slub.c:6377 [inline]
kmem_cache_free+0x187/0x6c0 mm/slub.c:6504
jffs2_free_ino_caches+0xec/0x1c0 fs/jffs2/nodelist.c:497
jffs2_put_super+0x6c/0x170 fs/jffs2/super.c:335
generic_shutdown_super+0x13d/0x2d0 fs/super.c:647
kill_mtd_super+0x23/0x70 drivers/mtd/mtdsuper.c:174
jffs2_kill_sb+0x96/0xb0 fs/jffs2/super.c:350
deactivate_locked_super+0xbc/0x130 fs/super.c:477
cleanup_mnt+0x3d3/0x460 fs/namespace.c:1317
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop+0x1fa/0x730 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
do_syscall_64+0x353/0x580 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888029725ec0
which belongs to the cache jffs2_inode_cache of size 48
The buggy address is located 40 bytes inside of
freed 48-byte region [ffff888029725ec0, ffff888029725ef0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888029725700 pfn:0x29725
flags: 0x80000000000200(workingset|node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000200 ffff888140435280 ffffea000085b790 ffff88801eb7ae88
raw: ffff888029725700 000000080040001c 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 5878, tgid 5877 (syz.2.27), ts 110407811516, free_ts 110388090000
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0x262a/0x26a0 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
alloc_slab_page mm/slub.c:3266 [inline]
allocate_slab+0x79/0x5e0 mm/slub.c:3380
new_slab mm/slub.c:3426 [inline]
refill_objects+0x2d8/0x350 mm/slub.c:7310
refill_sheaf mm/slub.c:2804 [inline]
__pcs_replace_empty_main+0x330/0x690 mm/slub.c:4675
alloc_from_pcs mm/slub.c:4773 [inline]
slab_alloc_node mm/slub.c:4905 [inline]
kmem_cache_alloc_noprof+0x452/0x650 mm/slub.c:4931
jffs2_do_new_inode+0x27/0x500 fs/jffs2/write.c:28
jffs2_new_inode+0x46e/0xd00 fs/jffs2/fs.c:466
jffs2_create+0x87/0x320 fs/jffs2/dir.c:182
lookup_open fs/namei.c:4508 [inline]
open_last_lookups fs/namei.c:4608 [inline]
path_openat+0x1344/0x3850 fs/namei.c:4860
do_file_open+0x23e/0x4a0 fs/namei.c:4892
do_sys_openat2+0x115/0x200 fs/open.c:1368
do_sys_open fs/open.c:1374 [inline]
__do_sys_openat fs/open.c:1390 [inline]
__se_sys_openat fs/open.c:1385 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1385
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 20 tgid 20 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0x10e7/0x11c0 mm/page_alloc.c:2950
rcu_do_batch kernel/rcu/tree.c:2645 [inline]
rcu_core kernel/rcu/tree.c:2897 [inline]
rcu_cpu_kthread+0x950/0x1480 kernel/rcu/tree.c:2985
smpboot_thread_fn+0x57c/0xa80 kernel/smpboot.c:160
kthread+0x388/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
Memory state around the buggy address:
ffff888029725d80: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff888029725e00: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
>ffff888029725e80: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
^
ffff888029725f00: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff888029725f80: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
==================================================================
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 12+ messages in thread
* [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
@ 2026-08-12 5:00 ` syzbot
0 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-08-12 5:00 UTC (permalink / raw)
To: dwmw2, linux-kernel, linux-mtd, richard, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: bcc44b6785f2 Merge tag 'drm-fixes-2026-08-08' of https://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=147d7e49580000
kernel config: https://syzkaller.appspot.com/x/.config?x=158601bb8cb292dd
dashboard link: https://syzkaller.appspot.com/bug?extid=3a8099322b09d8d073d1
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e4ca3ce763a0/disk-bcc44b67.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/face1dc3e618/vmlinux-bcc44b67.xz
kernel image: https://storage.googleapis.com/syzbot-assets/185a6a3df821/bzImage-bcc44b67.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3a8099322b09d8d073d1@syzkaller.appspotmail.com
RBP: 00007f5b86286090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f5b882b6038 R14: 00007f5b882b5fa0 R15: 00007ffe7e6b8828
</TASK>
==================================================================
BUG: KASAN: slab-use-after-free in jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
Read of size 4 at addr ffff888029725ee8 by task syz.8.1428/17657
CPU: 0 UID: 0 PID: 17657 Comm: syz.8.1428 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
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
jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
jffs2_do_clear_inode+0x58/0x390 fs/jffs2/readinode.c:1418
evict+0x624/0xb50 fs/inode.c:825
jffs2_new_inode+0x49c/0xd00 fs/jffs2/fs.c:-1
jffs2_mkdir+0x192/0xeb0 fs/jffs2/dir.c:485
vfs_mkdir+0x402/0x620 fs/namei.c:5276
filename_mkdirat+0x289/0x520 fs/namei.c:5309
__do_sys_mkdirat fs/namei.c:5330 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5327
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5b8802e0d9
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:00007f5b86286028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f5b882b5fa0 RCX: 00007f5b8802e0d9
RDX: 0000000000000000 RSI: 0000200000000640 RDI: ffffffffffffff9c
RBP: 00007f5b86286090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f5b882b6038 R14: 00007f5b882b5fa0 R15: 00007ffe7e6b8828
</TASK>
Allocated by task 14460:
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:4584 [inline]
slab_alloc_node mm/slub.c:4917 [inline]
kmem_cache_alloc_noprof+0x355/0x650 mm/slub.c:4931
jffs2_scan_make_ino_cache+0x89/0x1d0 fs/jffs2/scan.c:978
jffs2_scan_dirent_node fs/jffs2/scan.c:1099 [inline]
jffs2_scan_eraseblock fs/jffs2/scan.c:831 [inline]
jffs2_scan_medium+0x2b58/0x70c0 fs/jffs2/scan.c:151
jffs2_build_filesystem fs/jffs2/build.c:112 [inline]
jffs2_do_mount_fs+0x775/0x22c0 fs/jffs2/build.c:416
jffs2_do_fill_super+0x555/0xc50 fs/jffs2/fs.c:574
mtd_get_sb+0x18a/0x410 drivers/mtd/mtdsuper.c:57
mtd_get_sb_by_nr drivers/mtd/mtdsuper.c:88 [inline]
get_tree_mtd+0x4bd/0x7d0 drivers/mtd/mtdsuper.c:158
vfs_get_tree+0x92/0x2a0 fs/super.c:1700
fc_mount fs/namespace.c:1198 [inline]
do_new_mount_fc fs/namespace.c:3765 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3841
do_mount fs/namespace.c:4174 [inline]
__do_sys_mount fs/namespace.c:4390 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4367
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 7915:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/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:2677 [inline]
slab_free mm/slub.c:6377 [inline]
kmem_cache_free+0x187/0x6c0 mm/slub.c:6504
jffs2_free_ino_caches+0xec/0x1c0 fs/jffs2/nodelist.c:497
jffs2_put_super+0x6c/0x170 fs/jffs2/super.c:335
generic_shutdown_super+0x13d/0x2d0 fs/super.c:647
kill_mtd_super+0x23/0x70 drivers/mtd/mtdsuper.c:174
jffs2_kill_sb+0x96/0xb0 fs/jffs2/super.c:350
deactivate_locked_super+0xbc/0x130 fs/super.c:477
cleanup_mnt+0x3d3/0x460 fs/namespace.c:1317
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop+0x1fa/0x730 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
do_syscall_64+0x353/0x580 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888029725ec0
which belongs to the cache jffs2_inode_cache of size 48
The buggy address is located 40 bytes inside of
freed 48-byte region [ffff888029725ec0, ffff888029725ef0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888029725700 pfn:0x29725
flags: 0x80000000000200(workingset|node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000200 ffff888140435280 ffffea000085b790 ffff88801eb7ae88
raw: ffff888029725700 000000080040001c 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 5878, tgid 5877 (syz.2.27), ts 110407811516, free_ts 110388090000
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0x262a/0x26a0 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
alloc_slab_page mm/slub.c:3266 [inline]
allocate_slab+0x79/0x5e0 mm/slub.c:3380
new_slab mm/slub.c:3426 [inline]
refill_objects+0x2d8/0x350 mm/slub.c:7310
refill_sheaf mm/slub.c:2804 [inline]
__pcs_replace_empty_main+0x330/0x690 mm/slub.c:4675
alloc_from_pcs mm/slub.c:4773 [inline]
slab_alloc_node mm/slub.c:4905 [inline]
kmem_cache_alloc_noprof+0x452/0x650 mm/slub.c:4931
jffs2_do_new_inode+0x27/0x500 fs/jffs2/write.c:28
jffs2_new_inode+0x46e/0xd00 fs/jffs2/fs.c:466
jffs2_create+0x87/0x320 fs/jffs2/dir.c:182
lookup_open fs/namei.c:4508 [inline]
open_last_lookups fs/namei.c:4608 [inline]
path_openat+0x1344/0x3850 fs/namei.c:4860
do_file_open+0x23e/0x4a0 fs/namei.c:4892
do_sys_openat2+0x115/0x200 fs/open.c:1368
do_sys_open fs/open.c:1374 [inline]
__do_sys_openat fs/open.c:1390 [inline]
__se_sys_openat fs/open.c:1385 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1385
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 20 tgid 20 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0x10e7/0x11c0 mm/page_alloc.c:2950
rcu_do_batch kernel/rcu/tree.c:2645 [inline]
rcu_core kernel/rcu/tree.c:2897 [inline]
rcu_cpu_kthread+0x950/0x1480 kernel/rcu/tree.c:2985
smpboot_thread_fn+0x57c/0xa80 kernel/smpboot.c:160
kthread+0x388/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
Memory state around the buggy address:
ffff888029725d80: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff888029725e00: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
>ffff888029725e80: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
^
ffff888029725f00: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff888029725f80: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
==================================================================
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
2026-08-12 5:00 ` syzbot
@ 2026-10-02 15:04 ` syzbot
-1 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-10-02 15:04 UTC (permalink / raw)
To: dwmw2, linux-kernel, linux-mtd, luquijeffrey, richard,
sashiko-bot, sashiko-reviews, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 6474fa070f2b Add linux-next specific files for 20260929
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=11ef6035580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3477d5a04d788556
dashboard link: https://syzkaller.appspot.com/bug?extid=3a8099322b09d8d073d1
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=144b6725580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0b184b600605/disk-6474fa07.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/71aa06781faf/vmlinux-6474fa07.xz
kernel image: https://storage.googleapis.com/syzbot-assets/250dcdc25f2b/bzImage-6474fa07.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3a8099322b09d8d073d1@syzkaller.appspotmail.com
RDX: 00000000000001ff RSI: 0000200000000000 RDI: ffffffffffffff9c
RBP: 00007f74b6c3506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f74b6e26038 R14: 00007f74b6e25fa0 R15: 00007fff61b089a8
</TASK>
==================================================================
BUG: KASAN: slab-use-after-free in jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
Read of size 4 at addr ffff8880325b21a8 by task syz.0.310/6721
CPU: 1 UID: 0 PID: 6721 Comm: syz.0.310 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
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
jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
jffs2_do_clear_inode+0x58/0x390 fs/jffs2/readinode.c:1418
evict+0x624/0xb50 fs/inode.c:823
jffs2_new_inode+0x48a/0xd20 fs/jffs2/fs.c:-1
jffs2_mkdir+0x189/0xec0 fs/jffs2/dir.c:483
vfs_mkdir+0x40e/0x630 fs/namei.c:5423
filename_mkdirat+0x285/0x510 fs/namei.c:5456
__do_sys_mkdirat fs/namei.c:5477 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5474
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f74b6b9e159
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:00007f74b79b6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f74b6e25fa0 RCX: 00007f74b6b9e159
RDX: 00000000000001ff RSI: 0000200000000000 RDI: ffffffffffffff9c
RBP: 00007f74b6c3506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f74b6e26038 R14: 00007f74b6e25fa0 R15: 00007fff61b089a8
</TASK>
Allocated by task 6703:
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:351 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:377
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4720 [inline]
slab_alloc_node mm/slub.c:5033 [inline]
kmem_cache_alloc_noprof+0x2b4/0x600 mm/slub.c:5047
jffs2_scan_make_ino_cache+0x89/0x1d0 fs/jffs2/scan.c:978
jffs2_scan_inode_node fs/jffs2/scan.c:1025 [inline]
jffs2_scan_eraseblock fs/jffs2/scan.c:814 [inline]
jffs2_scan_medium+0x35ac/0x7240 fs/jffs2/scan.c:151
jffs2_build_filesystem fs/jffs2/build.c:112 [inline]
jffs2_do_mount_fs+0x775/0x22b0 fs/jffs2/build.c:416
jffs2_do_fill_super+0x555/0xc50 fs/jffs2/fs.c:574
mtd_get_sb+0x192/0x420 drivers/mtd/mtdsuper.c:59
get_tree_mtd+0x597/0x7d0 drivers/mtd/mtdsuper.c:143
vfs_get_tree+0x92/0x2a0 fs/super.c:1943
fc_mount fs/namespace.c:1209 [inline]
do_new_mount_fc fs/namespace.c:3785 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3861
do_mount fs/namespace.c:4194 [inline]
__do_sys_mount fs/namespace.c:4407 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4384
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 5744:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:264 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2780 [inline]
slab_free mm/slub.c:6630 [inline]
kmem_cache_free+0x182/0x650 mm/slub.c:6757
jffs2_free_ino_caches+0xec/0x1c0 fs/jffs2/nodelist.c:497
jffs2_put_super+0x6c/0x170 fs/jffs2/super.c:335
generic_shutdown_super+0x13d/0x2d0 fs/super.c:751
kill_mtd_super+0x23/0x70 drivers/mtd/mtdsuper.c:176
jffs2_kill_sb+0x96/0xb0 fs/jffs2/super.c:350
deactivate_locked_super+0xbe/0x110 fs/super.c:586
cleanup_mnt+0x3d3/0x460 fs/namespace.c:1329
task_work_run+0x1d9/0x260 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
do_syscall_64+0x328/0x520 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff8880325b2180
which belongs to the cache jffs2_inode_cache of size 48
The buggy address is located 40 bytes inside of
freed 48-byte region [ffff8880325b2180, ffff8880325b21b0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x325b2
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801e748b40 dead000000000100 dead000000000122
raw: 0000000000000000 0000000200400040 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 5830, tgid 5828 (syz.0.17), ts 89085743032
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1854
prep_new_page mm/page_alloc.c:1862 [inline]
get_page_from_freelist+0x220f/0x2280 mm/page_alloc.c:3933
__alloc_frozen_pages_noprof+0x1fc/0x400 mm/page_alloc.c:5441
alloc_slab_page mm/slub.c:3384 [inline]
allocate_slab+0x7d/0x5e0 mm/slub.c:3499
new_slab mm/slub.c:3550 [inline]
refill_objects+0x2d5/0x350 mm/slub.c:7539
refill_sheaf mm/slub.c:2917 [inline]
__pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4811
alloc_from_pcs mm/slub.c:4887 [inline]
slab_alloc_node mm/slub.c:5021 [inline]
kmem_cache_alloc_noprof+0x394/0x600 mm/slub.c:5047
jffs2_do_read_inode+0x33f/0x6a0 fs/jffs2/readinode.c:1372
jffs2_iget+0x228/0xcc0 fs/jffs2/fs.c:277
jffs2_do_fill_super+0x59d/0xc50 fs/jffs2/fs.c:578
mtd_get_sb+0x192/0x420 drivers/mtd/mtdsuper.c:59
get_tree_mtd+0x597/0x7d0 drivers/mtd/mtdsuper.c:143
vfs_get_tree+0x92/0x2a0 fs/super.c:1943
fc_mount fs/namespace.c:1209 [inline]
do_new_mount_fc fs/namespace.c:3785 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3861
do_mount fs/namespace.c:4194 [inline]
__do_sys_mount fs/namespace.c:4407 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4384
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
page last free pid 15 tgid 15 ts 88711812410 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1401 [inline]
__free_frozen_pages+0xc97/0xd90 mm/page_alloc.c:2952
__tlb_remove_table_free mm/mmu_gather.c:226 [inline]
tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:287
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x926/0x1260 kernel/rcu/tree.c:2919
handle_softirqs+0x223/0x840 kernel/softirq.c:645
run_ksoftirqd+0x36/0x60 kernel/softirq.c:1099
smpboot_thread_fn+0x565/0xa70 kernel/smpboot.c:160
kthread+0x38b/0x480 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
Memory state around the buggy address:
ffff8880325b2080: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff8880325b2100: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
>ffff8880325b2180: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
^
ffff8880325b2200: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff8880325b2280: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
==================================================================
---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
@ 2026-10-02 15:04 ` syzbot
0 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-10-02 15:04 UTC (permalink / raw)
To: dwmw2, linux-kernel, linux-mtd, luquijeffrey, richard,
sashiko-bot, sashiko-reviews, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 6474fa070f2b Add linux-next specific files for 20260929
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=11ef6035580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3477d5a04d788556
dashboard link: https://syzkaller.appspot.com/bug?extid=3a8099322b09d8d073d1
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=144b6725580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/0b184b600605/disk-6474fa07.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/71aa06781faf/vmlinux-6474fa07.xz
kernel image: https://storage.googleapis.com/syzbot-assets/250dcdc25f2b/bzImage-6474fa07.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3a8099322b09d8d073d1@syzkaller.appspotmail.com
RDX: 00000000000001ff RSI: 0000200000000000 RDI: ffffffffffffff9c
RBP: 00007f74b6c3506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f74b6e26038 R14: 00007f74b6e25fa0 R15: 00007fff61b089a8
</TASK>
==================================================================
BUG: KASAN: slab-use-after-free in jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
Read of size 4 at addr ffff8880325b21a8 by task syz.0.310/6721
CPU: 1 UID: 0 PID: 6721 Comm: syz.0.310 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
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
jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
jffs2_do_clear_inode+0x58/0x390 fs/jffs2/readinode.c:1418
evict+0x624/0xb50 fs/inode.c:823
jffs2_new_inode+0x48a/0xd20 fs/jffs2/fs.c:-1
jffs2_mkdir+0x189/0xec0 fs/jffs2/dir.c:483
vfs_mkdir+0x40e/0x630 fs/namei.c:5423
filename_mkdirat+0x285/0x510 fs/namei.c:5456
__do_sys_mkdirat fs/namei.c:5477 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5474
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f74b6b9e159
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:00007f74b79b6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f74b6e25fa0 RCX: 00007f74b6b9e159
RDX: 00000000000001ff RSI: 0000200000000000 RDI: ffffffffffffff9c
RBP: 00007f74b6c3506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f74b6e26038 R14: 00007f74b6e25fa0 R15: 00007fff61b089a8
</TASK>
Allocated by task 6703:
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:351 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:377
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4720 [inline]
slab_alloc_node mm/slub.c:5033 [inline]
kmem_cache_alloc_noprof+0x2b4/0x600 mm/slub.c:5047
jffs2_scan_make_ino_cache+0x89/0x1d0 fs/jffs2/scan.c:978
jffs2_scan_inode_node fs/jffs2/scan.c:1025 [inline]
jffs2_scan_eraseblock fs/jffs2/scan.c:814 [inline]
jffs2_scan_medium+0x35ac/0x7240 fs/jffs2/scan.c:151
jffs2_build_filesystem fs/jffs2/build.c:112 [inline]
jffs2_do_mount_fs+0x775/0x22b0 fs/jffs2/build.c:416
jffs2_do_fill_super+0x555/0xc50 fs/jffs2/fs.c:574
mtd_get_sb+0x192/0x420 drivers/mtd/mtdsuper.c:59
get_tree_mtd+0x597/0x7d0 drivers/mtd/mtdsuper.c:143
vfs_get_tree+0x92/0x2a0 fs/super.c:1943
fc_mount fs/namespace.c:1209 [inline]
do_new_mount_fc fs/namespace.c:3785 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3861
do_mount fs/namespace.c:4194 [inline]
__do_sys_mount fs/namespace.c:4407 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4384
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 5744:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:264 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2780 [inline]
slab_free mm/slub.c:6630 [inline]
kmem_cache_free+0x182/0x650 mm/slub.c:6757
jffs2_free_ino_caches+0xec/0x1c0 fs/jffs2/nodelist.c:497
jffs2_put_super+0x6c/0x170 fs/jffs2/super.c:335
generic_shutdown_super+0x13d/0x2d0 fs/super.c:751
kill_mtd_super+0x23/0x70 drivers/mtd/mtdsuper.c:176
jffs2_kill_sb+0x96/0xb0 fs/jffs2/super.c:350
deactivate_locked_super+0xbe/0x110 fs/super.c:586
cleanup_mnt+0x3d3/0x460 fs/namespace.c:1329
task_work_run+0x1d9/0x260 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
do_syscall_64+0x328/0x520 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff8880325b2180
which belongs to the cache jffs2_inode_cache of size 48
The buggy address is located 40 bytes inside of
freed 48-byte region [ffff8880325b2180, ffff8880325b21b0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x325b2
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff88801e748b40 dead000000000100 dead000000000122
raw: 0000000000000000 0000000200400040 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 5830, tgid 5828 (syz.0.17), ts 89085743032
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1854
prep_new_page mm/page_alloc.c:1862 [inline]
get_page_from_freelist+0x220f/0x2280 mm/page_alloc.c:3933
__alloc_frozen_pages_noprof+0x1fc/0x400 mm/page_alloc.c:5441
alloc_slab_page mm/slub.c:3384 [inline]
allocate_slab+0x7d/0x5e0 mm/slub.c:3499
new_slab mm/slub.c:3550 [inline]
refill_objects+0x2d5/0x350 mm/slub.c:7539
refill_sheaf mm/slub.c:2917 [inline]
__pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4811
alloc_from_pcs mm/slub.c:4887 [inline]
slab_alloc_node mm/slub.c:5021 [inline]
kmem_cache_alloc_noprof+0x394/0x600 mm/slub.c:5047
jffs2_do_read_inode+0x33f/0x6a0 fs/jffs2/readinode.c:1372
jffs2_iget+0x228/0xcc0 fs/jffs2/fs.c:277
jffs2_do_fill_super+0x59d/0xc50 fs/jffs2/fs.c:578
mtd_get_sb+0x192/0x420 drivers/mtd/mtdsuper.c:59
get_tree_mtd+0x597/0x7d0 drivers/mtd/mtdsuper.c:143
vfs_get_tree+0x92/0x2a0 fs/super.c:1943
fc_mount fs/namespace.c:1209 [inline]
do_new_mount_fc fs/namespace.c:3785 [inline]
do_new_mount+0x319/0xdc0 fs/namespace.c:3861
do_mount fs/namespace.c:4194 [inline]
__do_sys_mount fs/namespace.c:4407 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4384
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
page last free pid 15 tgid 15 ts 88711812410 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1401 [inline]
__free_frozen_pages+0xc97/0xd90 mm/page_alloc.c:2952
__tlb_remove_table_free mm/mmu_gather.c:226 [inline]
tlb_remove_table_rcu+0x85/0x100 mm/mmu_gather.c:287
rcu_do_batch kernel/rcu/tree.c:2650 [inline]
rcu_core+0x926/0x1260 kernel/rcu/tree.c:2919
handle_softirqs+0x223/0x840 kernel/softirq.c:645
run_ksoftirqd+0x36/0x60 kernel/softirq.c:1099
smpboot_thread_fn+0x565/0xa70 kernel/smpboot.c:160
kthread+0x38b/0x480 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
Memory state around the buggy address:
ffff8880325b2080: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff8880325b2100: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
>ffff8880325b2180: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
^
ffff8880325b2200: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff8880325b2280: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
==================================================================
---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
2026-08-12 5:00 ` syzbot
@ 2026-10-18 18:25 ` syzbot
-1 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-10-18 18:25 UTC (permalink / raw)
To: dwmw2, linux-kernel, linux-mtd, luquijeffrey, richard,
sashiko-bot, sashiko-reviews, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 32c52ec87d62 x86/insn-eval: Fix shadowed segment index in ..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=17065495580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38d39c45202f4fa
dashboard link: https://syzkaller.appspot.com/bug?extid=3a8099322b09d8d073d1
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17684bc9580000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3a8099322b09d8d073d1@syzkaller.appspotmail.com
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7e4a6b6038 R14: 00007f7e4a6b5fa0 R15: 00007ffd3d272cc8
</TASK>
==================================================================
BUG: KASAN: slab-use-after-free in jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
Read of size 4 at addr ffff888036a21728 by task syz.0.252/7233
CPU: 0 UID: 0 PID: 7233 Comm: syz.0.252 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
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
jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
jffs2_do_clear_inode+0x58/0x390 fs/jffs2/readinode.c:1418
evict+0x624/0xb50 fs/inode.c:822
jffs2_new_inode+0x49c/0xd40 fs/jffs2/fs.c:-1
jffs2_mkdir+0x189/0xec0 fs/jffs2/dir.c:483
vfs_mkdir+0x408/0x620 fs/namei.c:5409
filename_mkdirat+0x289/0x520 fs/namei.c:5442
__do_sys_mkdirat fs/namei.c:5463 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5460
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7e4a42e159
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:00007f7e49a8e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f7e4a6b5fa0 RCX: 00007f7e4a42e159
RDX: 00000000000001ff RSI: 0000200000000000 RDI: ffffffffffffff9c
RBP: 00007f7e4a4c506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7e4a6b6038 R14: 00007f7e4a6b5fa0 R15: 00007ffd3d272cc8
</TASK>
Allocated by task 7215:
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:351 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:377
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4683 [inline]
slab_alloc_node mm/slub.c:4996 [inline]
kmem_cache_alloc_noprof+0x360/0x690 mm/slub.c:5010
jffs2_scan_make_ino_cache+0x89/0x1d0 fs/jffs2/scan.c:978
jffs2_sum_process_sum_data fs/jffs2/summary.c:418 [inline]
jffs2_sum_scan_sumnode+0x49d/0x2870 fs/jffs2/summary.c:640
jffs2_scan_eraseblock fs/jffs2/scan.c:546 [inline]
jffs2_scan_medium+0x807/0x70c0 fs/jffs2/scan.c:151
jffs2_build_filesystem fs/jffs2/build.c:112 [inline]
jffs2_do_mount_fs+0x775/0x22c0 fs/jffs2/build.c:416
jffs2_do_fill_super+0x555/0xc50 fs/jffs2/fs.c:574
mtd_get_sb+0x18a/0x410 drivers/mtd/mtdsuper.c:57
get_tree_mtd+0x597/0x7d0 drivers/mtd/mtdsuper.c:141
vfs_get_tree+0x92/0x2a0 fs/super.c:1932
fc_mount fs/namespace.c:1282 [inline]
do_new_mount_fc fs/namespace.c:3898 [inline]
do_new_mount+0x325/0xb00 fs/namespace.c:3974
do_mount fs/namespace.c:4338 [inline]
__do_sys_mount fs/namespace.c:4556 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4533
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 6374:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:264 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2748 [inline]
slab_free mm/slub.c:6509 [inline]
kmem_cache_free+0x187/0x6d0 mm/slub.c:6636
jffs2_free_ino_caches+0xec/0x1c0 fs/jffs2/nodelist.c:497
jffs2_put_super+0x6c/0x170 fs/jffs2/super.c:335
generic_shutdown_super+0x13d/0x2d0 fs/super.c:751
kill_mtd_super+0x23/0x70 drivers/mtd/mtdsuper.c:174
jffs2_kill_sb+0x96/0xb0 fs/jffs2/super.c:350
deactivate_locked_super+0xbe/0x110 fs/super.c:586
cleanup_mnt+0x204/0x2a0 fs/namespace.c:1396
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
do_syscall_64+0x328/0x520 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888036a21700
which belongs to the cache jffs2_inode_cache of size 48
The buggy address is located 40 bytes inside of
freed 48-byte region [ffff888036a21700, ffff888036a21730)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36a21
flags: 0x80000000000000(node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000000 ffff88801ef9c3c0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000200400040 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 6518, tgid 6517 (syz.0.17), ts 167124265480
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
prep_new_page mm/page_alloc.c:1879 [inline]
get_page_from_freelist+0x2591/0x2600 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x230/0x5c0 mm/page_alloc.c:5436
alloc_slab_page mm/slub.c:3347 [inline]
allocate_slab+0x7d/0x620 mm/slub.c:3462
new_slab mm/slub.c:3513 [inline]
refill_objects+0x2d8/0x350 mm/slub.c:7418
refill_sheaf mm/slub.c:2885 [inline]
__pcs_replace_empty_main+0x339/0x690 mm/slub.c:4774
alloc_from_pcs mm/slub.c:4850 [inline]
slab_alloc_node mm/slub.c:4984 [inline]
kmem_cache_alloc_noprof+0x45d/0x690 mm/slub.c:5010
jffs2_do_new_inode+0x27/0x500 fs/jffs2/write.c:28
jffs2_new_inode+0x46e/0xd40 fs/jffs2/fs.c:466
jffs2_mkdir+0x189/0xec0 fs/jffs2/dir.c:483
vfs_mkdir+0x408/0x620 fs/namei.c:5409
filename_mkdirat+0x289/0x520 fs/namei.c:5442
__do_sys_mkdirat fs/namei.c:5463 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5460
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5649 tgid 5649 ts 149814430617 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0xf8e/0x1070 mm/page_alloc.c:2962
kasan_depopulate_vmalloc_pte+0x6d/0x90 mm/kasan/shadow.c:484
apply_to_pte_range mm/memory.c:3470 [inline]
apply_to_pmd_range mm/memory.c:3514 [inline]
apply_to_pud_range mm/memory.c:3550 [inline]
apply_to_p4d_range mm/memory.c:3586 [inline]
__apply_to_page_range+0xbd8/0x1420 mm/memory.c:3622
__kasan_release_vmalloc+0xa2/0xd0 mm/kasan/shadow.c:602
kasan_release_vmalloc include/linux/kasan.h:593 [inline]
kasan_release_vmalloc_node mm/vmalloc.c:2306 [inline]
purge_vmap_node+0x220/0x960 mm/vmalloc.c:2328
__purge_vmap_area_lazy+0x783/0xb40 mm/vmalloc.c:2418
drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2452
process_one_work kernel/workqueue.c:3396 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560
kthread+0x38b/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
Memory state around the buggy address:
ffff888036a21600: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff888036a21680: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
>ffff888036a21700: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
^
ffff888036a21780: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff888036a21800: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
==================================================================
---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
@ 2026-10-18 18:25 ` syzbot
0 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-10-18 18:25 UTC (permalink / raw)
To: dwmw2, linux-kernel, linux-mtd, luquijeffrey, richard,
sashiko-bot, sashiko-reviews, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 32c52ec87d62 x86/insn-eval: Fix shadowed segment index in ..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=17065495580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38d39c45202f4fa
dashboard link: https://syzkaller.appspot.com/bug?extid=3a8099322b09d8d073d1
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17684bc9580000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3a8099322b09d8d073d1@syzkaller.appspotmail.com
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7e4a6b6038 R14: 00007f7e4a6b5fa0 R15: 00007ffd3d272cc8
</TASK>
==================================================================
BUG: KASAN: slab-use-after-free in jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
Read of size 4 at addr ffff888036a21728 by task syz.0.252/7233
CPU: 0 UID: 0 PID: 7233 Comm: syz.0.252 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
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
jffs2_xattr_delete_inode+0x2c8/0x2d0 fs/jffs2/xattr.c:602
jffs2_do_clear_inode+0x58/0x390 fs/jffs2/readinode.c:1418
evict+0x624/0xb50 fs/inode.c:822
jffs2_new_inode+0x49c/0xd40 fs/jffs2/fs.c:-1
jffs2_mkdir+0x189/0xec0 fs/jffs2/dir.c:483
vfs_mkdir+0x408/0x620 fs/namei.c:5409
filename_mkdirat+0x289/0x520 fs/namei.c:5442
__do_sys_mkdirat fs/namei.c:5463 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5460
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7e4a42e159
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:00007f7e49a8e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007f7e4a6b5fa0 RCX: 00007f7e4a42e159
RDX: 00000000000001ff RSI: 0000200000000000 RDI: ffffffffffffff9c
RBP: 00007f7e4a4c506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7e4a6b6038 R14: 00007f7e4a6b5fa0 R15: 00007ffd3d272cc8
</TASK>
Allocated by task 7215:
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:351 [inline]
__kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:377
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4683 [inline]
slab_alloc_node mm/slub.c:4996 [inline]
kmem_cache_alloc_noprof+0x360/0x690 mm/slub.c:5010
jffs2_scan_make_ino_cache+0x89/0x1d0 fs/jffs2/scan.c:978
jffs2_sum_process_sum_data fs/jffs2/summary.c:418 [inline]
jffs2_sum_scan_sumnode+0x49d/0x2870 fs/jffs2/summary.c:640
jffs2_scan_eraseblock fs/jffs2/scan.c:546 [inline]
jffs2_scan_medium+0x807/0x70c0 fs/jffs2/scan.c:151
jffs2_build_filesystem fs/jffs2/build.c:112 [inline]
jffs2_do_mount_fs+0x775/0x22c0 fs/jffs2/build.c:416
jffs2_do_fill_super+0x555/0xc50 fs/jffs2/fs.c:574
mtd_get_sb+0x18a/0x410 drivers/mtd/mtdsuper.c:57
get_tree_mtd+0x597/0x7d0 drivers/mtd/mtdsuper.c:141
vfs_get_tree+0x92/0x2a0 fs/super.c:1932
fc_mount fs/namespace.c:1282 [inline]
do_new_mount_fc fs/namespace.c:3898 [inline]
do_new_mount+0x325/0xb00 fs/namespace.c:3974
do_mount fs/namespace.c:4338 [inline]
__do_sys_mount fs/namespace.c:4556 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4533
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 6374:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:264 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2748 [inline]
slab_free mm/slub.c:6509 [inline]
kmem_cache_free+0x187/0x6d0 mm/slub.c:6636
jffs2_free_ino_caches+0xec/0x1c0 fs/jffs2/nodelist.c:497
jffs2_put_super+0x6c/0x170 fs/jffs2/super.c:335
generic_shutdown_super+0x13d/0x2d0 fs/super.c:751
kill_mtd_super+0x23/0x70 drivers/mtd/mtdsuper.c:174
jffs2_kill_sb+0x96/0xb0 fs/jffs2/super.c:350
deactivate_locked_super+0xbe/0x110 fs/super.c:586
cleanup_mnt+0x204/0x2a0 fs/namespace.c:1396
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:70 [inline]
exit_to_user_mode_loop+0x204/0x770 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:343 [inline]
do_syscall_64+0x328/0x520 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888036a21700
which belongs to the cache jffs2_inode_cache of size 48
The buggy address is located 40 bytes inside of
freed 48-byte region [ffff888036a21700, ffff888036a21730)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36a21
flags: 0x80000000000000(node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000000 ffff88801ef9c3c0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000200400040 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 6518, tgid 6517 (syz.0.17), ts 167124265480
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871
prep_new_page mm/page_alloc.c:1879 [inline]
get_page_from_freelist+0x2591/0x2600 mm/page_alloc.c:3943
__alloc_frozen_pages_noprof+0x230/0x5c0 mm/page_alloc.c:5436
alloc_slab_page mm/slub.c:3347 [inline]
allocate_slab+0x7d/0x620 mm/slub.c:3462
new_slab mm/slub.c:3513 [inline]
refill_objects+0x2d8/0x350 mm/slub.c:7418
refill_sheaf mm/slub.c:2885 [inline]
__pcs_replace_empty_main+0x339/0x690 mm/slub.c:4774
alloc_from_pcs mm/slub.c:4850 [inline]
slab_alloc_node mm/slub.c:4984 [inline]
kmem_cache_alloc_noprof+0x45d/0x690 mm/slub.c:5010
jffs2_do_new_inode+0x27/0x500 fs/jffs2/write.c:28
jffs2_new_inode+0x46e/0xd40 fs/jffs2/fs.c:466
jffs2_mkdir+0x189/0xec0 fs/jffs2/dir.c:483
vfs_mkdir+0x408/0x620 fs/namei.c:5409
filename_mkdirat+0x289/0x520 fs/namei.c:5442
__do_sys_mkdirat fs/namei.c:5463 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5460
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5649 tgid 5649 ts 149814430617 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1418 [inline]
__free_frozen_pages+0xf8e/0x1070 mm/page_alloc.c:2962
kasan_depopulate_vmalloc_pte+0x6d/0x90 mm/kasan/shadow.c:484
apply_to_pte_range mm/memory.c:3470 [inline]
apply_to_pmd_range mm/memory.c:3514 [inline]
apply_to_pud_range mm/memory.c:3550 [inline]
apply_to_p4d_range mm/memory.c:3586 [inline]
__apply_to_page_range+0xbd8/0x1420 mm/memory.c:3622
__kasan_release_vmalloc+0xa2/0xd0 mm/kasan/shadow.c:602
kasan_release_vmalloc include/linux/kasan.h:593 [inline]
kasan_release_vmalloc_node mm/vmalloc.c:2306 [inline]
purge_vmap_node+0x220/0x960 mm/vmalloc.c:2328
__purge_vmap_area_lazy+0x783/0xb40 mm/vmalloc.c:2418
drain_vmap_area_work+0x27/0x40 mm/vmalloc.c:2452
process_one_work kernel/workqueue.c:3396 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560
kthread+0x38b/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
Memory state around the buggy address:
ffff888036a21600: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff888036a21680: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
>ffff888036a21700: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
^
ffff888036a21780: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
ffff888036a21800: fa fb fb fb fb fb fc fc fa fb fb fb fb fb fc fc
==================================================================
---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
2026-08-12 5:00 ` syzbot
@ 2026-10-19 5:54 ` syzbot
-1 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-10-19 5:54 UTC (permalink / raw)
To: dwmw2, linux-kernel, linux-mtd, luquijeffrey, miquel.raynal,
richard, sashiko-bot, sashiko-reviews, syzkaller-bugs, troglobit
syzbot has bisected this issue to:
commit 7b09acdcb944a9be6acc38ab1aa8a0ffd08871c1
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sat Oct 9 06:09:55 2021 +0000
mtd: block2mtd: add support for an optional custom MTD label
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14e7b13e580000
start commit: 32c52ec87d62 x86/insn-eval: Fix shadowed segment index in ..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
final oops: https://syzkaller.appspot.com/x/report.txt?x=16e7b13e580000
console output: https://syzkaller.appspot.com/x/log.txt?x=12e7b13e580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38d39c45202f4fa
dashboard link: https://syzkaller.appspot.com/bug?extid=3a8099322b09d8d073d1
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17684bc9580000
Reported-by: syzbot+3a8099322b09d8d073d1@syzkaller.appspotmail.com
Fixes: 7b09acdcb944 ("mtd: block2mtd: add support for an optional custom MTD label")
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
@ 2026-10-19 5:54 ` syzbot
0 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-10-19 5:54 UTC (permalink / raw)
To: dwmw2, linux-kernel, linux-mtd, luquijeffrey, miquel.raynal,
richard, sashiko-bot, sashiko-reviews, syzkaller-bugs, troglobit
syzbot has bisected this issue to:
commit 7b09acdcb944a9be6acc38ab1aa8a0ffd08871c1
Author: Joachim Wiberg <troglobit@gmail.com>
Date: Sat Oct 9 06:09:55 2021 +0000
mtd: block2mtd: add support for an optional custom MTD label
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14e7b13e580000
start commit: 32c52ec87d62 x86/insn-eval: Fix shadowed segment index in ..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
final oops: https://syzkaller.appspot.com/x/report.txt?x=16e7b13e580000
console output: https://syzkaller.appspot.com/x/log.txt?x=12e7b13e580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38d39c45202f4fa
dashboard link: https://syzkaller.appspot.com/bug?extid=3a8099322b09d8d073d1
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17684bc9580000
Reported-by: syzbot+3a8099322b09d8d073d1@syzkaller.appspotmail.com
Fixes: 7b09acdcb944 ("mtd: block2mtd: add support for an optional custom MTD label")
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
2026-08-12 5:00 ` syzbot
@ 2026-11-20 1:04 ` Shuai Liu
-1 siblings, 0 replies; 12+ messages in thread
From: Shuai Liu @ 2026-11-20 1:04 UTC (permalink / raw)
To: linux-mtd
Cc: richard, syzbot+3a8099322b09d8d073d1, luquijeffrey, linux-kernel
#syz test
Hi Richard,
Gentle ping. I posted a fix for this on 2026-11-03 [1]; it resubmits
Lucas Jeffrey's September patch with credit, as his thread had gone
quiet while the bug kept reproducing.
There has been no response so far, and the bug is still live -- 44
crashes recorded in the November monthly report [2]. The fix is a
one-liner clearing f->inocache in jffs2_init_inode_info(), consistent
with the other pointer fields there: a stale inocache survives slab
recycling after the previous mount's jffs2_free_ino_caches() and is
dereferenced by jffs2_xattr_delete_inode() on the evict() error path
when jffs2_new_inode() fails after jffs2_init_inode_info() but before
jffs2_do_new_inode() assigns a fresh inocache.
I've verified with the syzbot C reproducer under QEMU + KASAN: the UAF
triggers before the patch and is absent after it. The patch is inlined
below so syzbot can re-verify on current master.
Note that the syzbot bisection points at an unrelated block2mtd commit
(7b09acdc "mtd: block2mtd: add support for an optional custom MTD
label"); the repro mounts jffs2 on block2mtd, so that looks like
bisection noise.
Could you take a look?
Thanks,
Shuai Liu
[1] https://lore.kernel.org/all/tencent_A21BAE90D8EE04A5FB98B4168BA73C695306@qq.com/
[2] https://lore.kernel.org/all/6afbd91e.e6a8accb.234e85.000a.GAE@google.com/
---
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -55,6 +55,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
f->metadata = NULL;
f->dents = NULL;
f->target = NULL;
+ f->inocache = NULL;
f->flags = 0;
f->usercompr = 0;
}
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
@ 2026-11-20 1:04 ` Shuai Liu
0 siblings, 0 replies; 12+ messages in thread
From: Shuai Liu @ 2026-11-20 1:04 UTC (permalink / raw)
To: linux-mtd
Cc: richard, syzbot+3a8099322b09d8d073d1, luquijeffrey, linux-kernel
#syz test
Hi Richard,
Gentle ping. I posted a fix for this on 2026-11-03 [1]; it resubmits
Lucas Jeffrey's September patch with credit, as his thread had gone
quiet while the bug kept reproducing.
There has been no response so far, and the bug is still live -- 44
crashes recorded in the November monthly report [2]. The fix is a
one-liner clearing f->inocache in jffs2_init_inode_info(), consistent
with the other pointer fields there: a stale inocache survives slab
recycling after the previous mount's jffs2_free_ino_caches() and is
dereferenced by jffs2_xattr_delete_inode() on the evict() error path
when jffs2_new_inode() fails after jffs2_init_inode_info() but before
jffs2_do_new_inode() assigns a fresh inocache.
I've verified with the syzbot C reproducer under QEMU + KASAN: the UAF
triggers before the patch and is absent after it. The patch is inlined
below so syzbot can re-verify on current master.
Note that the syzbot bisection points at an unrelated block2mtd commit
(7b09acdc "mtd: block2mtd: add support for an optional custom MTD
label"); the repro mounts jffs2 on block2mtd, so that looks like
bisection noise.
Could you take a look?
Thanks,
Shuai Liu
[1] https://lore.kernel.org/all/tencent_A21BAE90D8EE04A5FB98B4168BA73C695306@qq.com/
[2] https://lore.kernel.org/all/6afbd91e.e6a8accb.234e85.000a.GAE@google.com/
---
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -55,6 +55,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
f->metadata = NULL;
f->dents = NULL;
f->target = NULL;
+ f->inocache = NULL;
f->flags = 0;
f->usercompr = 0;
}
--
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
2026-11-20 1:04 ` Shuai Liu
@ 2026-11-20 1:04 ` syzbot
-1 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-11-20 1:04 UTC (permalink / raw)
To: 847807867
Cc: 847807867, linux-kernel, linux-mtd, luquijeffrey, richard,
syzkaller-bugs
> #syz test
Patch testing via #syz test is temporarily disabled.
See https://github.com/google/syzkaller/issues/8122 for details.
>
> Hi Richard,
>
> Gentle ping. I posted a fix for this on 2026-11-03 [1]; it resubmits
> Lucas Jeffrey's September patch with credit, as his thread had gone
> quiet while the bug kept reproducing.
>
> There has been no response so far, and the bug is still live -- 44
> crashes recorded in the November monthly report [2]. The fix is a
> one-liner clearing f->inocache in jffs2_init_inode_info(), consistent
> with the other pointer fields there: a stale inocache survives slab
> recycling after the previous mount's jffs2_free_ino_caches() and is
> dereferenced by jffs2_xattr_delete_inode() on the evict() error path
> when jffs2_new_inode() fails after jffs2_init_inode_info() but before
> jffs2_do_new_inode() assigns a fresh inocache.
>
> I've verified with the syzbot C reproducer under QEMU + KASAN: the UAF
> triggers before the patch and is absent after it. The patch is inlined
> below so syzbot can re-verify on current master.
>
> Note that the syzbot bisection points at an unrelated block2mtd commit
> (7b09acdc "mtd: block2mtd: add support for an optional custom MTD
> label"); the repro mounts jffs2 on block2mtd, so that looks like
> bisection noise.
>
> Could you take a look?
>
> Thanks,
> Shuai Liu
>
> [1] https://lore.kernel.org/all/tencent_A21BAE90D8EE04A5FB98B4168BA73C695306@qq.com/
> [2] https://lore.kernel.org/all/6afbd91e.e6a8accb.234e85.000a.GAE@google.com/
>
> ---
> --- a/fs/jffs2/os-linux.h
> +++ b/fs/jffs2/os-linux.h
> @@ -55,6 +55,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
> f->metadata = NULL;
> f->dents = NULL;
> f->target = NULL;
> + f->inocache = NULL;
> f->flags = 0;
> f->usercompr = 0;
> }
> --
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode
@ 2026-11-20 1:04 ` syzbot
0 siblings, 0 replies; 12+ messages in thread
From: syzbot @ 2026-11-20 1:04 UTC (permalink / raw)
To: 847807867
Cc: 847807867, linux-kernel, linux-mtd, luquijeffrey, richard,
syzkaller-bugs
> #syz test
Patch testing via #syz test is temporarily disabled.
See https://github.com/google/syzkaller/issues/8122 for details.
>
> Hi Richard,
>
> Gentle ping. I posted a fix for this on 2026-11-03 [1]; it resubmits
> Lucas Jeffrey's September patch with credit, as his thread had gone
> quiet while the bug kept reproducing.
>
> There has been no response so far, and the bug is still live -- 44
> crashes recorded in the November monthly report [2]. The fix is a
> one-liner clearing f->inocache in jffs2_init_inode_info(), consistent
> with the other pointer fields there: a stale inocache survives slab
> recycling after the previous mount's jffs2_free_ino_caches() and is
> dereferenced by jffs2_xattr_delete_inode() on the evict() error path
> when jffs2_new_inode() fails after jffs2_init_inode_info() but before
> jffs2_do_new_inode() assigns a fresh inocache.
>
> I've verified with the syzbot C reproducer under QEMU + KASAN: the UAF
> triggers before the patch and is absent after it. The patch is inlined
> below so syzbot can re-verify on current master.
>
> Note that the syzbot bisection points at an unrelated block2mtd commit
> (7b09acdc "mtd: block2mtd: add support for an optional custom MTD
> label"); the repro mounts jffs2 on block2mtd, so that looks like
> bisection noise.
>
> Could you take a look?
>
> Thanks,
> Shuai Liu
>
> [1] https://lore.kernel.org/all/tencent_A21BAE90D8EE04A5FB98B4168BA73C695306@qq.com/
> [2] https://lore.kernel.org/all/6afbd91e.e6a8accb.234e85.000a.GAE@google.com/
>
> ---
> --- a/fs/jffs2/os-linux.h
> +++ b/fs/jffs2/os-linux.h
> @@ -55,6 +55,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
> f->metadata = NULL;
> f->dents = NULL;
> f->target = NULL;
> + f->inocache = NULL;
> f->flags = 0;
> f->usercompr = 0;
> }
> --
>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-11-20 1:04 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 5:00 [syzbot] [jffs2?] KASAN: slab-use-after-free Read in jffs2_xattr_delete_inode syzbot
2026-08-12 5:00 ` syzbot
2026-10-02 15:04 ` syzbot
2026-10-02 15:04 ` syzbot
2026-10-18 18:25 ` syzbot
2026-10-18 18:25 ` syzbot
2026-10-19 5:54 ` syzbot
2026-10-19 5:54 ` syzbot
2026-11-20 1:04 ` Shuai Liu
2026-11-20 1:04 ` Shuai Liu
2026-11-20 1:04 ` syzbot
2026-11-20 1:04 ` syzbot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.