{"id":"CVE-2023-53360","state":"PUBLISHED","title":"NFSv4.2: Rework scratch handling for READ_PLUS (again)","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nNFSv4.2: Rework scratch handling for READ_PLUS (again)\n\nI found that the read code might send multiple requests using the same\nnfs_pgio_header, but nfs4_proc_read_setup() is only called once. This is\nhow we ended up occasionally double-freeing the scratch buffer, but also\nmeans we set a NULL pointer but non-zero length to the xdr scratch\nbuffer. This results in an oops the first time decoding needs to copy\nsomething to scratch, which frequently happens when decoding READ_PLUS\nhole segments.\n\nI fix this by moving scratch handling into the pageio read code. I\nprovide a function to allocate scratch space for decoding read replies,\nand free the scratch buffer when the nfs_pgio_header is freed.","publishedAt":"2025-09-17T14:56:50.287Z","updatedAt":"2026-08-05T09:13:39.775Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"886959f425b6a936a30b82a297ae3aecb3b8230f","status":"affected","lessThan":"adac9f0ddd2b291c7ce41f549fdb27a13616cff5","versionType":"git"},{"version":"fbd2a05f29a95d5b42b294bf47e55a711424965b","status":"affected","lessThan":"a2f4cb206bd94b3f4a7bb05fcdce9525283b5681","versionType":"git"},{"version":"fbd2a05f29a95d5b42b294bf47e55a711424965b","status":"affected","lessThan":"ae5d5672f1db711e91db6f52df5cb16ecd8f5692","versionType":"git"},{"version":"fbd2a05f29a95d5b42b294bf47e55a711424965b","status":"affected","lessThan":"303a78052091c81e9003915c521fdca1c7e117af","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfs/internal.h","fs/nfs/nfs42.h","fs/nfs/nfs42xdr.c","fs/nfs/nfs4proc.c","fs/nfs/read.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"6.4.16","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5.3","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfs/internal.h","fs/nfs/nfs42.h","fs/nfs/nfs42xdr.c","fs/nfs/nfs4proc.c","fs/nfs/read.c"]}],"references":["https://git.kernel.org/stable/c/adac9f0ddd2b291c7ce41f549fdb27a13616cff5","https://git.kernel.org/stable/c/a2f4cb206bd94b3f4a7bb05fcdce9525283b5681","https://git.kernel.org/stable/c/ae5d5672f1db711e91db6f52df5cb16ecd8f5692","https://git.kernel.org/stable/c/303a78052091c81e9003915c521fdca1c7e117af"],"weaknesses":["CWE-415"],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/53xxx/CVE-2023-53360.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-53360","state":"PUBLISHED","datePublished":"2025-09-17T14:56:50.287Z","dateUpdated":"2026-08-05T09:13:39.775Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-09-17T14:54:09.733Z"},"containers":{"cna":{"title":"NFSv4.2: Rework scratch handling for READ_PLUS (again)","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nNFSv4.2: Rework scratch handling for READ_PLUS (again)\n\nI found that the read code might send multiple requests using the same\nnfs_pgio_header, but nfs4_proc_read_setup() is only called once. This is\nhow we ended up occasionally double-freeing the scratch buffer, but also\nmeans we set a NULL pointer but non-zero length to the xdr scratch\nbuffer. This results in an oops the first time decoding needs to copy\nsomething to scratch, which frequently happens when decoding READ_PLUS\nhole segments.\n\nI fix this by moving scratch handling into the pageio read code. I\nprovide a function to allocate scratch space for decoding read replies,\nand free the scratch buffer when the nfs_pgio_header is freed."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"886959f425b6a936a30b82a297ae3aecb3b8230f","status":"affected","lessThan":"adac9f0ddd2b291c7ce41f549fdb27a13616cff5","versionType":"git"},{"version":"fbd2a05f29a95d5b42b294bf47e55a711424965b","status":"affected","lessThan":"a2f4cb206bd94b3f4a7bb05fcdce9525283b5681","versionType":"git"},{"version":"fbd2a05f29a95d5b42b294bf47e55a711424965b","status":"affected","lessThan":"ae5d5672f1db711e91db6f52df5cb16ecd8f5692","versionType":"git"},{"version":"fbd2a05f29a95d5b42b294bf47e55a711424965b","status":"affected","lessThan":"303a78052091c81e9003915c521fdca1c7e117af","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfs/internal.h","fs/nfs/nfs42.h","fs/nfs/nfs42xdr.c","fs/nfs/nfs4proc.c","fs/nfs/read.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"6.4.16","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5.3","status":"unaffected","lessThanOrEqual":"6.5.*","versionType":"semver"},{"version":"6.6","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/nfs/internal.h","fs/nfs/nfs42.h","fs/nfs/nfs42xdr.c","fs/nfs/nfs4proc.c","fs/nfs/read.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/adac9f0ddd2b291c7ce41f549fdb27a13616cff5"},{"url":"https://git.kernel.org/stable/c/a2f4cb206bd94b3f4a7bb05fcdce9525283b5681"},{"url":"https://git.kernel.org/stable/c/ae5d5672f1db711e91db6f52df5cb16ecd8f5692"},{"url":"https://git.kernel.org/stable/c/303a78052091c81e9003915c521fdca1c7e117af"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - This is NFS client reply decoding (fs/nfs READ_PLUS): a malicious/compromised NFSv4.2 server or on-path AUTH_SYS attacker drives short reads and resends so the same nfs_pgio_header is reused after scratch is freed, then supplies READ_PLUS XDR that hits xdr_copy_to_scratch over the network.\nAC:L - The server fully controls short-read counts, READ_PLUS hole/data segment layout, and ENOTSUPP/stateid/sequence restarts that force rpc_restart_call_prepare without re-running nfs4_proc_read_setup; CONFIG_NFS_V4_2_READ_PLUS defaults to y, so no condition is outside attacker influence.\nPR:N - Exploitation is from the remote NFS server (or MITM) with no credentials or account on the victim client; decoding runs in the client's normal READ_PLUS completion path.\nUI:N - An existing NFSv4.2 mount plus routine/background read I/O is enough; the malicious server can wait for ordinary client reads without inducing a distinct victim action at exploit time.\nS:U - The double-free/UAF and resulting corruption stay in the NFS client's kernel address space within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Before the pointer was nulled, the resend path left a dangling scratch pointer so the next READ_PLUS decode memcpy'd into freed heap (UAF write/read of reclaimed slab); double-free/UAF enables arbitrary kernel disclosure per kernel guidance.\nI:H - The same resend path double-frees the kmalloc scratch (CWE-415) and, while the dangling pointer remains, writes attacker-shaped XDR fragments into reclaimed heap via xdr_copy_to_scratch — a heap corruption primitive suitable for control-flow hijack.\nA:H - After free-and-NULL, the next decode sets a NULL scratch with non-zero length and oopses on the first xdr_copy_to_scratch (common for READ_PLUS hole segments); double-free also reliably crashes or corrupts the client and is repeatable by the remote server."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:13:39.775Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.4.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.5.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.6"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"id":"CVE-2023-53360","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-01-14T18:43:57.674879Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-415","lang":"en","type":"CWE","description":"CWE-415 Double Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-01-14T18:53:00.565Z"}}]}}}