{"id":"CVE-2025-38571","state":"PUBLISHED","title":"sunrpc: fix client side handling of tls alerts","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsunrpc: fix client side handling of tls alerts\n\nA security exploit was discovered in NFS over TLS in tls_alert_recv\ndue to its assumption that there is valid data in the msghdr's\niterator's kvec.\n\nInstead, this patch proposes the rework how control messages are\nsetup and used by sock_recvmsg().\n\nIf no control message structure is setup, kTLS layer will read and\nprocess TLS data record types. As soon as it encounters a TLS control\nmessage, it would return an error. At that point, NFS can setup a kvec\nbacked control buffer and read in the control message such as a TLS\nalert. Scott found that a msg iterator can advance the kvec pointer\nas a part of the copy process thus we need to revert the iterator\nbefore calling into the tls_alert_recv.","publishedAt":"2025-08-19T17:02:51.620Z","updatedAt":"2026-10-15T22:02:25.809Z","severity":{"score":8.2,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"a55b3d15331859d9fdd261cfa6d34ca2aeb0fb95","versionType":"git"},{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"c36b2fbd60e8f9c6f975522130998608880c93be","versionType":"git"},{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"3ee397eaaca4fa04db21bb98c8f1d0c6cc525368","versionType":"git"},{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"3feada5baf4dc96e151ff2ca54630e1d274e5458","versionType":"git"},{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"cc5d59081fa26506d02de2127ab822f40d88bc5a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/xprtsock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.5","versionType":"semver"},{"version":"6.6.102","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.42","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.10","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.1","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/xprtsock.c"]}],"references":["https://git.kernel.org/stable/c/a55b3d15331859d9fdd261cfa6d34ca2aeb0fb95","https://git.kernel.org/stable/c/c36b2fbd60e8f9c6f975522130998608880c93be","https://git.kernel.org/stable/c/3ee397eaaca4fa04db21bb98c8f1d0c6cc525368","https://git.kernel.org/stable/c/3feada5baf4dc96e151ff2ca54630e1d274e5458","https://git.kernel.org/stable/c/cc5d59081fa26506d02de2127ab822f40d88bc5a"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38571.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38571","state":"PUBLISHED","datePublished":"2025-08-19T17:02:51.620Z","dateUpdated":"2026-10-15T22:02:25.809Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.025Z"},"containers":{"cna":{"title":"sunrpc: fix client side handling of tls alerts","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsunrpc: fix client side handling of tls alerts\n\nA security exploit was discovered in NFS over TLS in tls_alert_recv\ndue to its assumption that there is valid data in the msghdr's\niterator's kvec.\n\nInstead, this patch proposes the rework how control messages are\nsetup and used by sock_recvmsg().\n\nIf no control message structure is setup, kTLS layer will read and\nprocess TLS data record types. As soon as it encounters a TLS control\nmessage, it would return an error. At that point, NFS can setup a kvec\nbacked control buffer and read in the control message such as a TLS\nalert. Scott found that a msg iterator can advance the kvec pointer\nas a part of the copy process thus we need to revert the iterator\nbefore calling into the tls_alert_recv."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"a55b3d15331859d9fdd261cfa6d34ca2aeb0fb95","versionType":"git"},{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"c36b2fbd60e8f9c6f975522130998608880c93be","versionType":"git"},{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"3ee397eaaca4fa04db21bb98c8f1d0c6cc525368","versionType":"git"},{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"3feada5baf4dc96e151ff2ca54630e1d274e5458","versionType":"git"},{"version":"dea034b963c8901bdcc3d3880c04f0d75c95112f","status":"affected","lessThan":"cc5d59081fa26506d02de2127ab822f40d88bc5a","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/xprtsock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.5","versionType":"semver"},{"version":"6.6.102","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.42","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.10","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.1","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/xprtsock.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/a55b3d15331859d9fdd261cfa6d34ca2aeb0fb95"},{"url":"https://git.kernel.org/stable/c/c36b2fbd60e8f9c6f975522130998608880c93be"},{"url":"https://git.kernel.org/stable/c/3ee397eaaca4fa04db21bb98c8f1d0c6cc525368"},{"url":"https://git.kernel.org/stable/c/3feada5baf4dc96e151ff2ca54630e1d274e5458"},{"url":"https://git.kernel.org/stable/c/cc5d59081fa26506d02de2127ab822f40d88bc5a"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H","baseScore":8.2,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable code is the SUNRPC/NFS client's TCP-with-TLS receive path, driven entirely by records arriving from the remote RPC peer over the network. A malicious NFS server — or, with `xprtsec=tls` (anonymous TLS, `tls_client_hello_anon`), any on-path attacker impersonating it — triggers the bug purely by sending crafted RPC framing followed by a TLS alert record.\nAC:L - The attacker controls both halves of the trigger: an RPC fragment with a bogus calldir or unmatched XID forces the client into the `ITER_DISCARD` path, and an ordinary TLS alert record (even a close_notify) is then sent at will, yielding a deterministic NULL dereference with no race, no memory-layout guessing, and no reliance on victim state.\nPR:N - No credentials or privileges on the victim client are needed; the attacker acts as the TLS peer. With `xprtsec=tls` the peer is entirely unauthenticated (RFC 9289 opportunistic TLS), so even an unauthenticated MITM qualifies, and alerts are processed regardless of RPC-level authentication.\nUI:N - Exploitation needs no action from any user or administrator at attack time — the NFS-over-TLS mount is pre-existing, and the bug fires from the `xprtiod` workqueue receive path as soon as the attacker's records arrive.\nS:U - The faulting code, the corrupted read, and the resulting crash are all inside the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:L - On the bvec and past-the-end-kvec paths `tls_alert_recv()` reads two bytes through a type-confused or out-of-bounds pointer (a `struct page *` mistaken for `iov_base`, or an adjacent stack/heap word), leaking kernel memory into the `tls_alert_recv` tracepoint and into a fatal/non-fatal error oracle. The disclosure is real but strictly bounded to two bytes and is not returned to the attacker in bulk.\nI:N - `tls_alert_recv()` only reads through the bad pointer — there is no out-of-bounds write, no use-after-free, and no type confusion that yields a write primitive. The only effect is a bogus alert level selecting `-EACCES` versus `-EAGAIN` in the client's error handling.\nA:H - The `ITER_DISCARD` path dereferences a NULL kvec (and the exhausted-kvec path dereferences a garbage pointer read past the array), producing a kernel oops in the `xprtiod` kworker that kills the RPC receive worker and wedges all NFS I/O on that transport, or panics the machine outright where `panic_on_oops` is set."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:02:59.633Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.6.102"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.12.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.15.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.16.1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.17"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-38571","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-10-15T21:51:48.078418Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T22:02:25.809Z"}}]}}}