CVE-2025-38194: jffs2: check that raw node were preallocated before writing summary

Published Jul 4, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

jffs2: check that raw node were preallocated before writing summary

Syzkaller detected a kernel bug in jffs2linknoderef, caused by fault injection in jffs2preallocrawnoderefs. jffs2sumwritesumnode doesn't check return value of jffs2preallocrawnoderefs and simply lets any error propagate into jffs2sumwritedata, which eventually calls jffs2linknoderef in order to link the summary to an expectedly allocated node.

kernel BUG at fs/jffs2/nodelist.c:592! invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 1 PID: 31277 Comm: syz-executor.7 Not tainted 6.1.128-syzkaller-00139-ge10f83ca10a1 #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:jffs2linknoderef+0x570/0x690 fs/jffs2/nodelist.c:592 Call Trace: <TASK> jffs2sumwritedata fs/jffs2/summary.c:841 [inline] jffs2sumwritesumnode+0xd1a/0x1da0 fs/jffs2/summary.c:874 jffs2doreservespace+0xa18/0xd60 fs/jffs2/nodemgmt.c:388 jffs2reservespace+0x55f/0xaa0 fs/jffs2/nodemgmt.c:197 jffs2writeinoderange+0x246/0xb50 fs/jffs2/write.c:362 jffs2writeend+0x726/0x15d0 fs/jffs2/file.c:301 genericperformwrite+0x314/0x5d0 mm/filemap.c:3856 genericfilewriteiter+0x2ae/0x4d0 mm/filemap.c:3973 genericfilewriteiter+0xe3/0x350 mm/filemap.c:4005 callwriteiter include/linux/fs.h:2265 [inline] doiterreadvwritev+0x20f/0x3c0 fs/readwrite.c:735 doiterwrite+0x186/0x710 fs/readwrite.c:861 vfsiterwrite+0x70/0xa0 fs/readwrite.c:902 iterfilesplicewrite+0x73b/0xc90 fs/splice.c:685 dosplicefrom fs/splice.c:763 [inline] directspliceactor+0x10c/0x170 fs/splice.c:950 splicedirecttoactor+0x337/0xa10 fs/splice.c:896 dosplicedirect+0x1a9/0x280 fs/splice.c:1002 dosendfile+0xb13/0x12c0 fs/readwrite.c:1255 dosyssendfile64 fs/readwrite.c:1323 [inline] sesyssendfile64 fs/readwrite.c:1309 [inline] x64syssendfile64+0x1cf/0x210 fs/readwrite.c:1309 dosyscallx64 arch/x86/entry/common.c:51 [inline] dosyscall64+0x35/0x80 arch/x86/entry/common.c:81 entrySYSCALL64afterhwframe+0x6e/0xd8

Fix this issue by checking return value of jffs2preallocrawnoderefs before calling jffs2sumwritedata.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Affected Software

10 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=2.6.18<5.4.295
Linux Linux kernel>=5.5<5.10.239
Linux Linux kernel>=5.11<5.15.186
Linux Linux kernel>=5.16<6.1.142
Linux Linux kernel>=6.2<6.6.95
Linux Linux kernel>=6.7<6.12.35
Linux Linux kernel>=6.13<6.15.4
Debian Debian Linux=11.0
debian/linux
6.1.176-16.1.190-16.12.107-16.12.113-17.2.12-17.2.13-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1
  2. Compensating control

    In jffs2_sum_write_sumnode, check the return value of jffs2_prealloc_raw_node_refs before calling jffs2_sum_write_data, and propagate any error instead of allowing jffs2_link_node_ref to operate on an unallocated node.

Event History

Jul 4, 2025
CVE Published
via MITRE·01:37 PM
Data Sourced
via MITRE·01:37 PM
Description
Data Sourced
via NVD·02:15 PM
RemedyDescriptionSeverityAffected Software
Aug 7, 2025
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2025-38194?

CVE-2025-38194 has a severity rating that indicates it affects the stability and security of the Linux kernel.

2

How do I fix CVE-2025-38194?

To fix CVE-2025-38194, update your Linux kernel to the latest stable version where the vulnerability has been addressed.

3

What does the CVE-2025-38194 vulnerability affect?

CVE-2025-38194 affects the jffs2 file system in the Linux kernel, specifically related to node preallocation.

4

Who is impacted by CVE-2025-38194?

Any users or systems running an affected version of the Linux kernel with the jffs2 file system may be impacted by CVE-2025-38194.

5

What is the nature of the issue in CVE-2025-38194?

CVE-2025-38194 involves a kernel bug in jffs2_link_node_ref due to fault injection in jffs2_prealloc_raw_node_refs.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203