[BUG] jffs2: BUG_ON in jffs2_get_parent() on a crafted image
From: Farhad Alemi
Date: Thu Aug 27 2026 - 18:40:25 EST
Hello David Woodhouse, Richard Weinberger,
While fuzzing Linux 7.1-rc5 with syzkaller, as part of research at ASU's
SEFCOM lab, we hit the crash below. Crash reports can be found here:
https://github.com/farhad-alemi/public_bug_reports/tree/main/110-jffs2-bug_on-jffs2_get_parent/
jffs2: notice: (20910) jffs2_build_xattr_subsystem: complete
building xattr subsystem, 2 of xdatum (0 unchecked, 2 orphan) and 2 of
xref (0 dead, 2 orphan) found.
jffs2: notice: (20910) jffs2_build_xattr_subsystem: complete
building xattr subsystem, 2 of xdatum (0 unchecked, 2 orphan) and 2 of
xref (0 dead, 2 orphan) found.
------------[ cut here ]------------
kernel BUG at fs/jffs2/super.c:141!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 20910 Comm: syz.6.1218 Not tainted 7.1.0-rc5 #1
PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:jffs2_get_parent+0x1bd/0x1c0 fs/jffs2/super.c:141
Code: ff ff 44 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 46 ff ff ff 4c 89
ff 89 f5 e8 40 e7 01 ff 89 ee e9 35 ff ff ff e8 64 7d 9a fe 90 <0f> 0b
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e
Our reproducer.c is available upon request.
Happy to test a patch if that would help.
Regards,