mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [syzbot] [jffs2?] KASAN: invalid-free in jffs2_free_inode
@ 2026-08-23 13:33 syzbot
  2026-08-23 14:52 ` Forwarded: [PATCH] jffs2: fix double-free of f->target in jffs2_alloc_inode() syzbot
  2026-09-27  2:14 ` [syzbot] [jffs2?] KASAN: invalid-free in jffs2_free_inode syzbot
  0 siblings, 2 replies; 3+ messages in thread
From: syzbot @ 2026-08-23 13:33 UTC (permalink / raw)
  To: dwmw2, linux-kernel, linux-mtd, richard, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    b126f6f5940f Merge tag 'x86_mm_for_7.3-rc1' of git://git.k..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15ae2549580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=90b2fd087b14b23e
dashboard link: https://syzkaller.appspot.com/bug?extid=675e84fdf3dde67b4946
compiler:       gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=136c3a25580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-b126f6f5.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c8d6c4cd1182/vmlinux-b126f6f5.xz
kernel image: https://storage.googleapis.com/syzbot-assets/559693826b5b/bzImage-b126f6f5.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+675e84fdf3dde67b4946@syzkaller.appspotmail.com

R13: 00007f2c55825fac R14: 00007f2c55825fa0 R15: 00007f2c55825fa0
 </TASK>
==================================================================
BUG: KASAN: double-free in jffs2_free_inode+0x39/0x60 fs/jffs2/super.c:52
Free of addr ffff8880371e2200 by task syz.0.345/6450

CPU: 0 UID: 0 PID: 6450 Comm: syz.0.345 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0x13d/0x4b0 mm/kasan/report.c:482
 kasan_report_invalid_free+0xb8/0x190 mm/kasan/report.c:557
 check_slab_allocation+0xc3/0xf0 mm/kasan/common.c:235
 kasan_slab_pre_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:2622 [inline]
 slab_free mm/slub.c:6377 [inline]
 kfree+0x1b6/0x6c0 mm/slub.c:6692
 jffs2_free_inode+0x39/0x60 fs/jffs2/super.c:52
 i_callback fs/inode.c:317 [inline]
 alloc_inode+0x153/0x250 fs/inode.c:352
 iget_locked+0x1d9/0x6d0 fs/inode.c:1473
 jffs2_iget+0xb5/0xe30 fs/jffs2/fs.c:265
 jffs2_lookup+0x353/0x410 fs/jffs2/dir.c:114
 lookup_one_qstr_excl+0x1cd/0x250 fs/namei.c:1810
 __start_dirop fs/namei.c:2920 [inline]
 start_dirop fs/namei.c:2942 [inline]
 filename_create+0x1cf/0x400 fs/namei.c:5092
 filename_symlinkat+0xe1/0x560 fs/namei.c:5813
 __do_sys_symlink fs/namei.c:5846 [inline]
 __se_sys_symlink fs/namei.c:5842 [inline]
 __x64_sys_symlink+0x79/0xb0 fs/namei.c:5842
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2c5559e0d9
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:00007ffc968200b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 00007f2c55825fa0 RCX: 00007f2c5559e0d9
RDX: 0000000000000000 RSI: 0000200000000800 RDI: 0000200000000540
RBP: 00007ffc96820120 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 00007f2c55825fac R14: 00007f2c55825fa0 R15: 00007f2c55825fa0
 </TASK>

Allocated by task 6382:
 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
 kasan_save_track+0x14/0x30 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
 __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5334 [inline]
 __kmalloc_noprof+0x324/0x820 mm/slub.c:5359
 _kmalloc_noprof include/linux/slab.h:992 [inline]
 _kmalloc_array_noprof include/linux/slab.h:1208 [inline]
 security_inode_init_security+0x113/0x370 security/security.c:1347
 shmem_symlink+0x163/0xa00 mm/shmem.c:4044
 vfs_symlink fs/namei.c:5794 [inline]
 vfs_symlink+0x178/0x4d0 fs/namei.c:5773
 filename_symlinkat+0x2a6/0x560 fs/namei.c:5819
 __do_sys_symlinkat fs/namei.c:5839 [inline]
 __se_sys_symlinkat fs/namei.c:5834 [inline]
 __x64_sys_symlinkat+0x9c/0xe0 fs/namei.c:5834
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 6382:
 kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
 kasan_save_track+0x14/0x30 mm/kasan/common.c:78
 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:253 [inline]
 __kasan_slab_free+0x5f/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]
 kfree+0x22b/0x6c0 mm/slub.c:6692
 security_inode_init_security+0x2bf/0x370 security/security.c:1374
 shmem_symlink+0x163/0xa00 mm/shmem.c:4044
 vfs_symlink fs/namei.c:5794 [inline]
 vfs_symlink+0x178/0x4d0 fs/namei.c:5773
 filename_symlinkat+0x2a6/0x560 fs/namei.c:5819
 __do_sys_symlinkat fs/namei.c:5839 [inline]
 __se_sys_symlinkat fs/namei.c:5834 [inline]
 __x64_sys_symlinkat+0x9c/0xe0 fs/namei.c:5834
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff8880371e2200
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 0 bytes inside of
 256-byte region [ffff8880371e2200, ffff8880371e2300)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880371e2200 pfn:0x371e2
head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000240 ffff88801c042b40 ffffea0000e86f90 ffffea0000f41010
raw: ffff8880371e2200 000000080010000e 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88801c042b40 ffffea0000e86f90 ffffea0000f41010
head: ffff8880371e2200 000000080010000e 00000000f5000000 0000000000000000
head: 00fff00000000001 ffffffffffffff81 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5784, tgid 5784 (syz-executor), ts 57239645098, free_ts 56961973186
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0xf46/0x3500 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304
 alloc_slab_page mm/slub.c:3266 [inline]
 allocate_slab mm/slub.c:3380 [inline]
 new_slab+0xa2/0x660 mm/slub.c:3426
 refill_objects+0xe3/0x410 mm/slub.c:7310
 refill_sheaf mm/slub.c:2804 [inline]
 __pcs_replace_empty_main+0x372/0x680 mm/slub.c:4675
 alloc_from_pcs mm/slub.c:4773 [inline]
 slab_alloc_node mm/slub.c:4905 [inline]
 __do_kmalloc_node mm/slub.c:5333 [inline]
 __kmalloc_noprof+0x66b/0x820 mm/slub.c:5359
 _kmalloc_noprof include/linux/slab.h:992 [inline]
 _kmalloc_array_noprof include/linux/slab.h:1208 [inline]
 security_inode_init_security+0x113/0x370 security/security.c:1347
 shmem_mknod+0x2ce/0x480 mm/shmem.c:3814
 shmem_mkdir+0x31/0x80 mm/shmem.c:3869
 vfs_mkdir+0x364/0x850 fs/namei.c:5410
 filename_mkdirat+0x48b/0x5e0 fs/namei.c:5443
 __do_sys_mkdirat fs/namei.c:5464 [inline]
 __se_sys_mkdirat fs/namei.c:5461 [inline]
 __x64_sys_mkdirat+0x89/0xc0 fs/namei.c:5461
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5777 tgid 5777 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 __free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350
 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+0x26b/0x6a0 mm/slub.c:4931
 anon_vma_chain_alloc mm/rmap.c:142 [inline]
 __anon_vma_prepare+0xae/0x5e0 mm/rmap.c:194
 __vmf_anon_prepare+0x11f/0x250 mm/memory.c:3829
 vmf_anon_prepare mm/internal.h:494 [inline]
 do_anonymous_page+0x51b/0x2080 mm/memory.c:5338
 do_pte_missing mm/memory.c:4564 [inline]
 handle_pte_fault mm/memory.c:6379 [inline]
 __handle_mm_fault+0x1d2c/0x2a00 mm/memory.c:6517
 handle_mm_fault+0x37b/0xa30 mm/memory.c:6686
 do_user_addr_fault+0x59c/0x12f0 arch/x86/mm/fault.c:1343
 handle_page_fault arch/x86/mm/fault.c:1483 [inline]
 exc_page_fault+0x6f/0xd0 arch/x86/mm/fault.c:1536
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595

Memory state around the buggy address:
 ffff8880371e2100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8880371e2180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880371e2200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8880371e2280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880371e2300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc 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 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.

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] 3+ messages in thread

* Forwarded: [PATCH] jffs2: fix double-free of f->target in jffs2_alloc_inode()
  2026-08-23 13:33 [syzbot] [jffs2?] KASAN: invalid-free in jffs2_free_inode syzbot
@ 2026-08-23 14:52 ` syzbot
  2026-09-27  2:14 ` [syzbot] [jffs2?] KASAN: invalid-free in jffs2_free_inode syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2026-08-23 14:52 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: [PATCH] jffs2: fix double-free of f->target in jffs2_alloc_inode()
Author: kartikey406@gmail.com

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master


jffs2_alloc_inode() does not initialize f->target before returning
the new inode. It is normally cleared later by
jffs2_init_inode_info(), called from jffs2_iget(), but that runs
only after alloc_inode() has already returned successfully.

If inode_init_always() fails in between, alloc_inode() calls
->free_inode() directly on the half-initialized inode.
jffs2_free_inode() then does kfree(f->target) on whatever stale
value was left in the reused slab object, which can be a pointer
that was already freed, causing a double-free.

Initialize f->target to NULL in jffs2_alloc_inode() to close this
window.

Reported-by: syzbot+675e84fdf3dde67b4946@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=675e84fdf3dde67b4946
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
---
 fs/jffs2/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 81396a092ba8..3c32d5c776e1 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -42,6 +42,7 @@ static struct inode *jffs2_alloc_inode(struct super_block *sb)
 	f = alloc_inode_sb(sb, jffs2_inode_cachep, GFP_KERNEL);
 	if (!f)
 		return NULL;
+	f->target = NULL;
 	return &f->vfs_inode;
 }
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [syzbot] [jffs2?] KASAN: invalid-free in jffs2_free_inode
  2026-08-23 13:33 [syzbot] [jffs2?] KASAN: invalid-free in jffs2_free_inode syzbot
  2026-08-23 14:52 ` Forwarded: [PATCH] jffs2: fix double-free of f->target in jffs2_alloc_inode() syzbot
@ 2026-09-27  2:14 ` syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2026-09-27  2:14 UTC (permalink / raw)
  To: dwmw2, kartikey406, kees, linux-kernel, linux-mtd, richard,
	syzkaller-bugs, viro

syzbot has found a reproducer for the following issue on:

HEAD commit:    f5f84daefcd9 Add linux-next specific files for 20260925
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=10f35a05580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=be00179930e43a43
dashboard link: https://syzkaller.appspot.com/bug?extid=675e84fdf3dde67b4946
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=17b49315580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=16e12605580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e42cbc7060af/disk-f5f84dae.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e80a7ee494ac/vmlinux-f5f84dae.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f41cc55a1308/bzImage-f5f84dae.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+675e84fdf3dde67b4946@syzkaller.appspotmail.com

RSP: 002b:00007ffed613c038 EFLAGS: 00000246 ORIG_RAX: 000000000000010a
RAX: ffffffffffffffda RBX: 00007fa9e1225fa0 RCX: 00007fa9e0f9e159
RDX: 0000200000000080 RSI: ffffffffffffff9c RDI: 0000200000000000
RBP: 00007ffed613c0a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fa9e1225fac R14: 00007fa9e1225fa0 R15: 00007fa9e1225fa0
 </TASK>
==================================================================
BUG: KASAN: double-free in jffs2_free_inode+0x41/0x60 fs/jffs2/super.c:52
Free of addr ffff8880216a6380 by task syz.0.224/6314

CPU: 0 UID: 0 PID: 6314 Comm: syz.0.224 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/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_invalid_free+0xea/0x110 mm/kasan/report.c:557
 check_slab_allocation mm/kasan/common.c:-1 [inline]
 __kasan_slab_pre_free+0x104/0x120 mm/kasan/common.c:272
 kasan_slab_pre_free include/linux/kasan.h:199 [inline]
 slab_free_hook mm/slub.c:2725 [inline]
 slab_free mm/slub.c:6630 [inline]
 kfree+0x173/0x650 mm/slub.c:6923
 jffs2_free_inode+0x41/0x60 fs/jffs2/super.c:52
 i_callback fs/inode.c:318 [inline]
 alloc_inode+0x17c/0x1b0 fs/inode.c:353
 iget_locked+0x12c/0x690 fs/inode.c:1473
 jffs2_iget+0xac/0xcc0 fs/jffs2/fs.c:265
 jffs2_lookup+0x377/0x430 fs/jffs2/dir.c:114
 lookup_one_qstr_excl+0x12d/0x360 fs/namei.c:1810
 __start_dirop fs/namei.c:2920 [inline]
 start_dirop fs/namei.c:2942 [inline]
 filename_create+0x20e/0x370 fs/namei.c:5101
 filename_symlinkat+0xf7/0x410 fs/namei.c:5824
 __do_sys_symlinkat fs/namei.c:5850 [inline]
 __se_sys_symlinkat+0x4e/0x2b0 fs/namei.c:5845
 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:0x7fa9e0f9e159
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:00007ffed613c038 EFLAGS: 00000246 ORIG_RAX: 000000000000010a
RAX: ffffffffffffffda RBX: 00007fa9e1225fa0 RCX: 00007fa9e0f9e159
RDX: 0000200000000080 RSI: ffffffffffffff9c RDI: 0000200000000000
RBP: 00007ffed613c0a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fa9e1225fac R14: 00007fa9e1225fa0 R15: 00007fa9e1225fa0
 </TASK>

Allocated by task 6042:
 kasan_save_stack mm/kasan/common.c:57 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
 poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
 __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:426
 kasan_kmalloc include/linux/kasan.h:263 [inline]
 __do_kmalloc_node mm/slub.c:5531 [inline]
 __kmalloc_noprof+0x366/0x710 mm/slub.c:5556
 _kmalloc_noprof include/linux/slab.h:995 [inline]
 jffs2_do_read_inode_internal+0x4d11/0x6790 fs/jffs2/readinode.c:1271
 jffs2_do_read_inode+0x4b4/0x6a0 fs/jffs2/readinode.c:1389
 jffs2_iget+0x228/0xcc0 fs/jffs2/fs.c:277
 jffs2_lookup+0x377/0x430 fs/jffs2/dir.c:114
 lookup_one_qstr_excl+0x12d/0x360 fs/namei.c:1810
 __start_dirop fs/namei.c:2920 [inline]
 start_dirop fs/namei.c:2942 [inline]
 filename_create+0x20e/0x370 fs/namei.c:5101
 filename_symlinkat+0xf7/0x410 fs/namei.c:5824
 __do_sys_symlinkat fs/namei.c:5850 [inline]
 __se_sys_symlinkat+0x4e/0x2b0 fs/namei.c:5845
 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 15:
 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]
 kfree+0x1c5/0x650 mm/slub.c:6923
 jffs2_free_inode+0x41/0x60 fs/jffs2/super.c:52
 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

The buggy address belongs to the object at ffff8880216a6380
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 8-byte region [ffff8880216a6380, ffff8880216a6388)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880216a6a60 pfn:0x216a6
flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000200 ffff88813ff24500 ffffea0000adf290 ffffea0000adaf50
raw: ffff8880216a6a60 000000000080004e 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 1, tgid 1 (swapper/0), ts 3479526280
 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+0x2209/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]
 __do_kmalloc_node mm/slub.c:5530 [inline]
 __kmalloc_noprof+0x476/0x710 mm/slub.c:5556
 _kmalloc_noprof include/linux/slab.h:995 [inline]
 acpi_ex_allocate_name_string+0x79/0x290 drivers/acpi/acpica/exnames.c:66
 acpi_ex_get_name_string+0x488/0xa90 drivers/acpi/acpica/exnames.c:367
 acpi_ds_create_operand+0x5c7/0xbe0 drivers/acpi/acpica/dsutils.c:446
 acpi_ds_evaluate_name_path+0x1a5/0x460 drivers/acpi/acpica/dsutils.c:778
 acpi_ds_exec_end_op+0x28b/0x1b00 drivers/acpi/acpica/dswexec.c:374
 acpi_ps_parse_loop+0xfa3/0x23f0 drivers/acpi/acpica/psloop.c:553
 acpi_ps_parse_aml+0x388/0x1020 drivers/acpi/acpica/psparse.c:489
 acpi_ps_execute_method+0x89d/0xa70 drivers/acpi/acpica/psxface.c:190
 acpi_ns_evaluate+0xd05/0x1320 drivers/acpi/acpica/nseval.c:205
page last free pid 1 tgid 1 ts 3320811456 stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 __free_pages_prepare mm/page_alloc.c:1401 [inline]
 __free_frozen_pages+0xc93/0xd90 mm/page_alloc.c:2952
 __slab_free+0x269/0x2c0 mm/slub.c:5926
 qlink_free mm/kasan/quarantine.c:163 [inline]
 qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179
 kasan_quarantine_remove_cache+0x35d/0x380 mm/kasan/quarantine.c:388
 kmem_cache_shrink+0xd/0x20 mm/slab_common.c:611
 acpi_os_purge_cache+0x15/0x20 drivers/acpi/osl.c:1622
 acpi_purge_cached_objects+0xac/0x100 drivers/acpi/acpica/utxface.c:239
 acpi_initialize_objects+0x2e/0xb0 drivers/acpi/acpica/utxfinit.c:250
 acpi_bus_init+0xa8/0x360 drivers/acpi/bus.c:1397
 acpi_init+0xa1/0x1f0 drivers/acpi/bus.c:1486
 do_one_initcall+0x250/0x870 init/main.c:1360
 do_initcall_level+0x10a/0x1a0 init/main.c:1422
 do_initcalls+0x59/0xa0 init/main.c:1438
 kernel_init_freeable+0x29d/0x3e0 init/main.c:1673
 kernel_init+0x22/0x1d0 init/main.c:1563
 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158

Memory state around the buggy address:
 ffff8880216a6280: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
 ffff8880216a6300: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
>ffff8880216a6380: fa fc fc fc fa fc fc fc fa fc fc fc fa fc fc fc
                   ^
 ffff8880216a6400: fa fc fc fc fa fc fc fc 05 fc fc fc 05 fc fc fc
 ffff8880216a6480: 05 fc fc fc 05 fc fc fc 06 fc fc fc 06 fc 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] 3+ messages in thread

end of thread, other threads:[~2026-09-27  2:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-23 13:33 [syzbot] [jffs2?] KASAN: invalid-free in jffs2_free_inode syzbot
2026-08-23 14:52 ` Forwarded: [PATCH] jffs2: fix double-free of f->target in jffs2_alloc_inode() syzbot
2026-09-27  2:14 ` [syzbot] [jffs2?] KASAN: invalid-free in jffs2_free_inode syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®