In the Linux kernel, the following vulnerability has been resolved:
jffs2: check jffs2preallocrawnoderefs() result in few other places
Fuzzing hit another invalid pointer dereference due to the lack of checking whether jffs2preallocrawnoderefs() completed successfully. Subsequent logic implies that the node refs have been allocated.
Handle that. The code is ready for propagating the error upwards.
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 1 PID: 5835 Comm: syz-executor145 Not tainted 5.10.234-syzkaller #0 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:jffs2linknoderef+0xac/0x690 fs/jffs2/nodelist.c:600 Call Trace: jffs2markerasedblock fs/jffs2/erase.c:460 [inline] jffs2erasependingblocks+0x688/0x1860 fs/jffs2/erase.c:118 jffs2garbagecollectpass+0x638/0x1a00 fs/jffs2/gc.c:253 jffs2reservespace+0x3f4/0xad0 fs/jffs2/nodemgmt.c:167 jffs2writeinoderange+0x246/0xb50 fs/jffs2/write.c:362 jffs2writeend+0x712/0x1110 fs/jffs2/file.c:302 genericperformwrite+0x2c2/0x500 mm/filemap.c:3347 _genericfilewriteiter+0x252/0x610 mm/filemap.c:3465 genericfilewriteiter+0xdb/0x230 mm/filemap.c:3497 callwriteiter include/linux/fs.h:2039 [inline] doiterreadvwritev+0x46d/0x750 fs/readwrite.c:740 doiterwrite+0x18c/0x710 fs/readwrite.c:866 vfswritev+0x1db/0x6a0 fs/readwrite.c:939 dopwritev fs/readwrite.c:1036 [inline] _dosyspwritev fs/readwrite.c:1083 [inline] _sesyspwritev fs/readwrite.c:1078 [inline] _x64syspwritev+0x235/0x310 fs/readwrite.c:1078 dosyscall64+0x30/0x40 arch/x86/entry/common.c:46 entrySYSCALL64after_hwframe+0x67/0xd1
Found by Linux Verification Center (linuxtesting.org) with Syzkaller.
[
{
"id": "CVE-2025-38328-063e700b",
"digest": {
"line_hashes": [
"304704686814625297885759327020099414998",
"194577071961763174659046534615346403381",
"145904794283999179966977282715136355498",
"140052602311105363866275048706167575763"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2b6d96503255a3ed676cd70f8368870c6d6a25c6",
"target": {
"file": "fs/jffs2/scan.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-0f9d764b",
"digest": {
"length": 2220.0,
"function_hash": "99905931572288863727443713080348365993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7e860296d7808de1db175c1eda29f94a2955dcc4",
"target": {
"file": "fs/jffs2/erase.c",
"function": "jffs2_mark_erased_block"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-21eb09d0",
"digest": {
"line_hashes": [
"288383906816566782173147290298876803248",
"168911422235229997245226682970107953743",
"4263323350358868853839071979664796360",
"296160098241284623427567741007855454940"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d96e6451a8d0fe62492d4cc942d695772293c05a",
"target": {
"file": "fs/jffs2/erase.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-2263d3c6",
"digest": {
"length": 2220.0,
"function_hash": "99905931572288863727443713080348365993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd42ddddd70abc7127c12b96c8c85dbd080ea56f",
"target": {
"file": "fs/jffs2/erase.c",
"function": "jffs2_mark_erased_block"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-259038d5",
"digest": {
"line_hashes": [
"288383906816566782173147290298876803248",
"168911422235229997245226682970107953743",
"4263323350358868853839071979664796360",
"296160098241284623427567741007855454940"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1b81776f337a9b997f797c70ac0a26d838a2168",
"target": {
"file": "fs/jffs2/erase.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-2d2a0c18",
"digest": {
"line_hashes": [
"304704686814625297885759327020099414998",
"194577071961763174659046534615346403381",
"145904794283999179966977282715136355498",
"140052602311105363866275048706167575763"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d96e6451a8d0fe62492d4cc942d695772293c05a",
"target": {
"file": "fs/jffs2/scan.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-47c38eca",
"digest": {
"line_hashes": [
"288383906816566782173147290298876803248",
"168911422235229997245226682970107953743",
"4263323350358868853839071979664796360",
"296160098241284623427567741007855454940"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f41c625328777f9ad572901ba0b0065bb9c9c1da",
"target": {
"file": "fs/jffs2/erase.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-4a07a879",
"digest": {
"line_hashes": [
"304704686814625297885759327020099414998",
"194577071961763174659046534615346403381",
"145904794283999179966977282715136355498",
"140052602311105363866275048706167575763"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd42ddddd70abc7127c12b96c8c85dbd080ea56f",
"target": {
"file": "fs/jffs2/scan.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-6092681a",
"digest": {
"length": 2220.0,
"function_hash": "99905931572288863727443713080348365993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1b81776f337a9b997f797c70ac0a26d838a2168",
"target": {
"file": "fs/jffs2/erase.c",
"function": "jffs2_mark_erased_block"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-65bd6b7d",
"digest": {
"length": 2220.0,
"function_hash": "99905931572288863727443713080348365993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@38d767fb4a7766ec2058f97787e4c6e8d10343d6",
"target": {
"file": "fs/jffs2/erase.c",
"function": "jffs2_mark_erased_block"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-6bc8ef1e",
"digest": {
"length": 4411.0,
"function_hash": "99402113216986678501493853164291209710"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@042fa922c84b5080401bcd8897d4ac4919d15075",
"target": {
"file": "fs/jffs2/scan.c",
"function": "jffs2_scan_medium"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-746b5b35",
"digest": {
"line_hashes": [
"304704686814625297885759327020099414998",
"194577071961763174659046534615346403381",
"145904794283999179966977282715136355498",
"140052602311105363866275048706167575763"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7e860296d7808de1db175c1eda29f94a2955dcc4",
"target": {
"file": "fs/jffs2/scan.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-7990b73f",
"digest": {
"line_hashes": [
"304704686814625297885759327020099414998",
"194577071961763174659046534615346403381",
"145904794283999179966977282715136355498",
"140052602311105363866275048706167575763"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1b81776f337a9b997f797c70ac0a26d838a2168",
"target": {
"file": "fs/jffs2/scan.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-80d5e0a8",
"digest": {
"length": 4411.0,
"function_hash": "99402113216986678501493853164291209710"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d96e6451a8d0fe62492d4cc942d695772293c05a",
"target": {
"file": "fs/jffs2/scan.c",
"function": "jffs2_scan_medium"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-8bc6a325",
"digest": {
"length": 4411.0,
"function_hash": "99402113216986678501493853164291209710"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@38d767fb4a7766ec2058f97787e4c6e8d10343d6",
"target": {
"file": "fs/jffs2/scan.c",
"function": "jffs2_scan_medium"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-9ee250c6",
"digest": {
"length": 4411.0,
"function_hash": "99402113216986678501493853164291209710"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2b6d96503255a3ed676cd70f8368870c6d6a25c6",
"target": {
"file": "fs/jffs2/scan.c",
"function": "jffs2_scan_medium"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-aa842e6a",
"digest": {
"length": 2220.0,
"function_hash": "99905931572288863727443713080348365993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d96e6451a8d0fe62492d4cc942d695772293c05a",
"target": {
"file": "fs/jffs2/erase.c",
"function": "jffs2_mark_erased_block"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-b7c469e7",
"digest": {
"line_hashes": [
"288383906816566782173147290298876803248",
"168911422235229997245226682970107953743",
"4263323350358868853839071979664796360",
"296160098241284623427567741007855454940"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd42ddddd70abc7127c12b96c8c85dbd080ea56f",
"target": {
"file": "fs/jffs2/erase.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-bb1e3c45",
"digest": {
"line_hashes": [
"288383906816566782173147290298876803248",
"168911422235229997245226682970107953743",
"4263323350358868853839071979664796360",
"296160098241284623427567741007855454940"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7e860296d7808de1db175c1eda29f94a2955dcc4",
"target": {
"file": "fs/jffs2/erase.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-c4a27e76",
"digest": {
"line_hashes": [
"288383906816566782173147290298876803248",
"168911422235229997245226682970107953743",
"4263323350358868853839071979664796360",
"296160098241284623427567741007855454940"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2b6d96503255a3ed676cd70f8368870c6d6a25c6",
"target": {
"file": "fs/jffs2/erase.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-c75967b0",
"digest": {
"length": 2220.0,
"function_hash": "99905931572288863727443713080348365993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2b6d96503255a3ed676cd70f8368870c6d6a25c6",
"target": {
"file": "fs/jffs2/erase.c",
"function": "jffs2_mark_erased_block"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-c7fe369b",
"digest": {
"line_hashes": [
"304704686814625297885759327020099414998",
"194577071961763174659046534615346403381",
"145904794283999179966977282715136355498",
"140052602311105363866275048706167575763"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@042fa922c84b5080401bcd8897d4ac4919d15075",
"target": {
"file": "fs/jffs2/scan.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-d82a8859",
"digest": {
"length": 2220.0,
"function_hash": "99905931572288863727443713080348365993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f41c625328777f9ad572901ba0b0065bb9c9c1da",
"target": {
"file": "fs/jffs2/erase.c",
"function": "jffs2_mark_erased_block"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-d9e6dd45",
"digest": {
"length": 4411.0,
"function_hash": "99402113216986678501493853164291209710"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1b81776f337a9b997f797c70ac0a26d838a2168",
"target": {
"file": "fs/jffs2/scan.c",
"function": "jffs2_scan_medium"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-dca41dfd",
"digest": {
"length": 4382.0,
"function_hash": "321480859259175234368501123353711407977"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7e860296d7808de1db175c1eda29f94a2955dcc4",
"target": {
"file": "fs/jffs2/scan.c",
"function": "jffs2_scan_medium"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-dd0946c8",
"digest": {
"line_hashes": [
"288383906816566782173147290298876803248",
"168911422235229997245226682970107953743",
"4263323350358868853839071979664796360",
"296160098241284623427567741007855454940"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@042fa922c84b5080401bcd8897d4ac4919d15075",
"target": {
"file": "fs/jffs2/erase.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-e574dc43",
"digest": {
"line_hashes": [
"304704686814625297885759327020099414998",
"194577071961763174659046534615346403381",
"145904794283999179966977282715136355498",
"140052602311105363866275048706167575763"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@38d767fb4a7766ec2058f97787e4c6e8d10343d6",
"target": {
"file": "fs/jffs2/scan.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-f29ab19c",
"digest": {
"length": 2220.0,
"function_hash": "99905931572288863727443713080348365993"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@042fa922c84b5080401bcd8897d4ac4919d15075",
"target": {
"file": "fs/jffs2/erase.c",
"function": "jffs2_mark_erased_block"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-f309fc59",
"digest": {
"length": 4411.0,
"function_hash": "99402113216986678501493853164291209710"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f41c625328777f9ad572901ba0b0065bb9c9c1da",
"target": {
"file": "fs/jffs2/scan.c",
"function": "jffs2_scan_medium"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-f5d81434",
"digest": {
"line_hashes": [
"288383906816566782173147290298876803248",
"168911422235229997245226682970107953743",
"4263323350358868853839071979664796360",
"296160098241284623427567741007855454940"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@38d767fb4a7766ec2058f97787e4c6e8d10343d6",
"target": {
"file": "fs/jffs2/erase.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
},
{
"id": "CVE-2025-38328-f6cca09a",
"digest": {
"length": 4411.0,
"function_hash": "99402113216986678501493853164291209710"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cd42ddddd70abc7127c12b96c8c85dbd080ea56f",
"target": {
"file": "fs/jffs2/scan.c",
"function": "jffs2_scan_medium"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Function"
},
{
"id": "CVE-2025-38328-ff159729",
"digest": {
"line_hashes": [
"304704686814625297885759327020099414998",
"194577071961763174659046534615346403381",
"145904794283999179966977282715136355498",
"140052602311105363866275048706167575763"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f41c625328777f9ad572901ba0b0065bb9c9c1da",
"target": {
"file": "fs/jffs2/scan.c"
},
"deprecated": false,
"signature_version": "v1",
"signature_type": "Line"
}
]