CVE-2025-38194

Source
https://cve.org/CVERecord?id=CVE-2025-38194
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38194.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38194
Downstream
Related
Published
2025-07-04T13:37:17.922Z
Modified
2026-03-20T12:42:44.018203Z
Summary
jffs2: check that raw node were preallocated before writing summary
Details

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 genericperform_write+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/read_write.c:1323 [inline] __sesyssendfile64 fs/read_write.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 jffs2sumwrite_data.

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

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38194.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
2f785402f39b96a077b6e62bf26164bfb8e0c980
Fixed
337f80f3d546e131c7aa90b61d8cde051ae858c7
Fixed
8ce46dc5b10b0b6f67663202a4921b0e11ad7367
Fixed
4adee34098a6ee86a54bf3ec885eab620c126a6b
Fixed
c0edcdb4fc106d69a2d1a0ce4868193511c389f3
Fixed
3f46644a5131a4793fc95c32a7d0a769745b06e7
Fixed
da12ef7e19048dc5714032c2db587a215852b200
Fixed
346cfb9d19ea7feb6fb57917b21c4797fb444dab
Fixed
ec9e6f22bce433b260ea226de127ec68042849b0

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38194.json"