{"id":"CVE-2024-35882","state":"PUBLISHED","title":"SUNRPC: Fix a slow server-side memory leak with RPC-over-TCP","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nSUNRPC: Fix a slow server-side memory leak with RPC-over-TCP\n\nJan Schunk reports that his small NFS servers suffer from memory\nexhaustion after just a few days. A bisect shows that commit\ne18e157bb5c8 (\"SUNRPC: Send RPC message on TCP with a single\nsock_sendmsg() call\") is the first bad commit.\n\nThat commit assumed that sock_sendmsg() releases all the pages in\nthe underlying bio_vec array, but the reality is that it doesn't.\nsvc_xprt_release() releases the rqst's response pages, but the\nrecord marker page fragment isn't one of those, so it is never\nreleased.\n\nThis is a narrow fix that can be applied to stable kernels. A\nmore extensive fix is in the works.","publishedAt":"2024-05-19T08:34:39.185Z","updatedAt":"2026-08-05T11:30:39.154Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e18e157bb5c8c1cd8a9ba25acfdcf4f3035836f4","status":"affected","lessThan":"1ba1291172f935e6b6fe703161a948f3347400b8","versionType":"git"},{"version":"e18e157bb5c8c1cd8a9ba25acfdcf4f3035836f4","status":"affected","lessThan":"a2ebedf7bcd17a1194a0a18122c885eb578ee882","versionType":"git"},{"version":"e18e157bb5c8c1cd8a9ba25acfdcf4f3035836f4","status":"affected","lessThan":"05258a0a69b3c5d2c003f818702c0a52b6fea861","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/svcsock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.26","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.5","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/svcsock.c"]}],"references":["https://git.kernel.org/stable/c/1ba1291172f935e6b6fe703161a948f3347400b8","https://git.kernel.org/stable/c/a2ebedf7bcd17a1194a0a18122c885eb578ee882","https://git.kernel.org/stable/c/05258a0a69b3c5d2c003f818702c0a52b6fea861"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:30.303Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/35xxx/CVE-2024-35882.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-35882","state":"PUBLISHED","datePublished":"2024-05-19T08:34:39.185Z","dateUpdated":"2026-08-05T11:30:39.154Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-17T13:50:33.112Z"},"containers":{"cna":{"title":"SUNRPC: Fix a slow server-side memory leak with RPC-over-TCP","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nSUNRPC: Fix a slow server-side memory leak with RPC-over-TCP\n\nJan Schunk reports that his small NFS servers suffer from memory\nexhaustion after just a few days. A bisect shows that commit\ne18e157bb5c8 (\"SUNRPC: Send RPC message on TCP with a single\nsock_sendmsg() call\") is the first bad commit.\n\nThat commit assumed that sock_sendmsg() releases all the pages in\nthe underlying bio_vec array, but the reality is that it doesn't.\nsvc_xprt_release() releases the rqst's response pages, but the\nrecord marker page fragment isn't one of those, so it is never\nreleased.\n\nThis is a narrow fix that can be applied to stable kernels. A\nmore extensive fix is in the works."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"e18e157bb5c8c1cd8a9ba25acfdcf4f3035836f4","status":"affected","lessThan":"1ba1291172f935e6b6fe703161a948f3347400b8","versionType":"git"},{"version":"e18e157bb5c8c1cd8a9ba25acfdcf4f3035836f4","status":"affected","lessThan":"a2ebedf7bcd17a1194a0a18122c885eb578ee882","versionType":"git"},{"version":"e18e157bb5c8c1cd8a9ba25acfdcf4f3035836f4","status":"affected","lessThan":"05258a0a69b3c5d2c003f818702c0a52b6fea861","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/svcsock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.6","versionType":"semver"},{"version":"6.6.26","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.5","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/svcsock.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1ba1291172f935e6b6fe703161a948f3347400b8"},{"url":"https://git.kernel.org/stable/c/a2ebedf7bcd17a1194a0a18122c885eb578ee882"},{"url":"https://git.kernel.org/stable/c/05258a0a69b3c5d2c003f818702c0a52b6fea861"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The leak is in the server-side SUNRPC transmit path used by nfsd/lockd over TCP; it is triggered by sending an RPC to the listening socket from any remote host that can reach the service.\nAC:L - No race, timing, or memory-layout condition is involved — every RPC reply leaks the record-marker fragment deterministically, and every new TCP connection leaks a full 32 KB page.\nPR:N - svc_process_common() emits a reply (and thus allocates the leaked marker) via its err_bad_prog/err_bad_vers/err_bad_proc/err_bad_auth paths and for the NULL procedure, so no valid credentials or export membership are needed.\nUI:N - The attacker drives the entire sequence by connecting and sending RPC traffic; no action by a local user or administrator is required.\nS:U - The leaked memory and the resulting exhaustion are confined to the kernel of the NFS server itself, with no crossing of a virtualization, IOMMU, or sandbox boundary.\nC:N - The bug only fails to release a reference on a page fragment; no kernel memory contents are disclosed to the attacker and there is no out-of-bounds read.\nI:N - No memory is corrupted or overwritten — the fragment is simply never freed, so no data or control-flow integrity is affected.\nA:H - __page_frag_cache_drain() cannot free the 32 KB order-3 page because the never-released marker fragment holds the last reference, so each unauthenticated connection permanently leaks up to 32 KB; a remote attacker looping connect/send/close exhausts server memory and triggers OOM, and real deployments died of memory exhaustion under normal load."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:30:39.154Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.6.26"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.8.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-35882","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-20T17:12:02.633258Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:34:45.656Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/1ba1291172f935e6b6fe703161a948f3347400b8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/a2ebedf7bcd17a1194a0a18122c885eb578ee882","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/05258a0a69b3c5d2c003f818702c0a52b6fea861","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T03:21:48.421Z"}}]}}}