{"id":"CVE-2024-27388","state":"PUBLISHED","title":"SUNRPC: fix some memleaks in gssx_dec_option_array","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nSUNRPC: fix some memleaks in gssx_dec_option_array\n\nThe creds and oa->data need to be freed in the error-handling paths after\ntheir allocation. So this patch add these deallocations in the\ncorresponding paths.","publishedAt":"2024-05-01T13:05:05.518Z","updatedAt":"2026-08-05T11:29:23.858Z","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":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"b97c37978ca825557d331c9012e0c1ddc0e42364","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"bfa9d86d39a0fe4685f90c3529aa9bd62a9d97a8","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"bb336cd8d5ecb69c430ebe3e7bcff68471d93fa8","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"dd292e884c649f9b1c18af0ec75ca90b390cd044","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"934212a623cbab851848b6de377eb476718c3e4c","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"5e6013ae2c8d420faea553d363935f65badd32c3","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"9806c2393cd2ab0a8e7bb9ffae02ce20e3112ec4","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"996997d1fb2126feda550d6adcedcbd94911fc69","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"3cfcfc102a5e57b021b786a755a38935e357797d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/auth_gss/gss_rpc_xdr.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.10","versionType":"semver"},{"version":"4.19.311","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.273","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.214","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.153","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.83","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.23","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.11","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.2","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/auth_gss/gss_rpc_xdr.c"]}],"references":["https://git.kernel.org/stable/c/b97c37978ca825557d331c9012e0c1ddc0e42364","https://git.kernel.org/stable/c/bfa9d86d39a0fe4685f90c3529aa9bd62a9d97a8","https://git.kernel.org/stable/c/bb336cd8d5ecb69c430ebe3e7bcff68471d93fa8","https://git.kernel.org/stable/c/dd292e884c649f9b1c18af0ec75ca90b390cd044","https://git.kernel.org/stable/c/934212a623cbab851848b6de377eb476718c3e4c","https://git.kernel.org/stable/c/5e6013ae2c8d420faea553d363935f65badd32c3","https://git.kernel.org/stable/c/9806c2393cd2ab0a8e7bb9ffae02ce20e3112ec4","https://git.kernel.org/stable/c/996997d1fb2126feda550d6adcedcbd94911fc69","https://git.kernel.org/stable/c/3cfcfc102a5e57b021b786a755a38935e357797d","https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/27xxx/CVE-2024-27388.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-27388","state":"PUBLISHED","datePublished":"2024-05-01T13:05:05.518Z","dateUpdated":"2026-08-05T11:29:23.858Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-25T13:47:42.676Z"},"containers":{"cna":{"title":"SUNRPC: fix some memleaks in gssx_dec_option_array","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nSUNRPC: fix some memleaks in gssx_dec_option_array\n\nThe creds and oa->data need to be freed in the error-handling paths after\ntheir allocation. So this patch add these deallocations in the\ncorresponding paths."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"b97c37978ca825557d331c9012e0c1ddc0e42364","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"bfa9d86d39a0fe4685f90c3529aa9bd62a9d97a8","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"bb336cd8d5ecb69c430ebe3e7bcff68471d93fa8","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"dd292e884c649f9b1c18af0ec75ca90b390cd044","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"934212a623cbab851848b6de377eb476718c3e4c","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"5e6013ae2c8d420faea553d363935f65badd32c3","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"9806c2393cd2ab0a8e7bb9ffae02ce20e3112ec4","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"996997d1fb2126feda550d6adcedcbd94911fc69","versionType":"git"},{"version":"1d658336b05f8697d6445834f8867f8ad5e4f735","status":"affected","lessThan":"3cfcfc102a5e57b021b786a755a38935e357797d","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/sunrpc/auth_gss/gss_rpc_xdr.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.10","versionType":"semver"},{"version":"4.19.311","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.273","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.214","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.153","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.83","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.23","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.7.11","status":"unaffected","lessThanOrEqual":"6.7.*","versionType":"semver"},{"version":"6.8.2","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/auth_gss/gss_rpc_xdr.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b97c37978ca825557d331c9012e0c1ddc0e42364"},{"url":"https://git.kernel.org/stable/c/bfa9d86d39a0fe4685f90c3529aa9bd62a9d97a8"},{"url":"https://git.kernel.org/stable/c/bb336cd8d5ecb69c430ebe3e7bcff68471d93fa8"},{"url":"https://git.kernel.org/stable/c/dd292e884c649f9b1c18af0ec75ca90b390cd044"},{"url":"https://git.kernel.org/stable/c/934212a623cbab851848b6de377eb476718c3e4c"},{"url":"https://git.kernel.org/stable/c/5e6013ae2c8d420faea553d363935f65badd32c3"},{"url":"https://git.kernel.org/stable/c/9806c2393cd2ab0a8e7bb9ffae02ce20e3112ec4"},{"url":"https://git.kernel.org/stable/c/996997d1fb2126feda550d6adcedcbd94911fc69"},{"url":"https://git.kernel.org/stable/c/3cfcfc102a5e57b021b786a755a38935e357797d"}],"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 - The vulnerable decoder is executed only as a direct consequence of an RPCSEC_GSS_INIT request arriving at in-kernel nfsd over TCP/2049, so a remote NFS client drives entry into the code and controls how often it runs. Although the malformed/short XDR reply is delivered by the local gssproxy daemon, the attacker's reach to the vulnerable function is purely over the network.\nAC:L - The attacker can invoke the upcall path an unlimited number of times pre-authentication, and each invocation pins 256 KB of receive pages plus the in-token pages, letting the attacker themselves create the slab/memory-pressure condition under which the `kzalloc(struct svc_cred)` fails and the dangling-pointer path is taken (trivially so for a memcg-limited/containerized nfsd). The attacker also influences gssproxy reply size via principal name length and group-list size, driving the `-ENOSPC` decode-error paths, so the required conditions are attacker-inducible rather than beyond their control.\nPR:N - `svcauth_gss_proxy_init()` is reached from `svcauth_gss_proc_init()` on the very first leg of the GSS handshake, before any Kerberos credential is validated — the upcall is performed even for a garbage input token. No account, key, or prior authentication on the NFS server is needed.\nUI:N - The path is triggered entirely by an inbound RPC from the attacker; no administrator or user of the target system needs to mount, click, or open anything.\nS:U - The corrupted objects (`gssx_option`, `svc_cred`) and the resulting heap damage are all inside the kernel's own security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - With `oa->count == 1` and `oa->data` dangling, `gssp_accept_sec_context_upcall()` reads `res.options.data[0].value` out of a freed kmalloc-32 object and then dereferences the pointer it finds there into `data->creds`, so freed/reallocated kernel memory contents are consumed and can populate `cr_uid`/`cr_gid`/`cr_principal` — a use-after-free read that both discloses kernel memory and can determine the identity the NFS client is authenticated as.\nI:H - The same path yields `kfree()` of a pointer taken from freed memory plus a double free of `oa->data`, and later `free_svc_cred()` performs `put_group_info()`, `gss_mech_put()` and further `kfree()`s on attacker-groomable pointers — an arbitrary-free and arbitrary-refcount-decrement primitive that is a well-established route to controlled heap corruption and control-flow hijack.\nA:H - The double free trips SLUB's free-object detection (`BUG`/panic, fatal with `panic_on_oops` on the appliance and NAS deployments where nfsd+gssproxy is typical), and the NULL `oa->data` variant of the same incoherent `oa->count` faults immediately in the caller. The unbounded, remotely repeatable leakage of the decoder's allocations additionally drives the server toward OOM."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:29:23.858Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"4.19.311"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"5.4.273"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"5.10.214"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"5.15.153"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"6.1.83"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"6.6.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"6.7.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"6.8.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.10","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/b97c37978ca825557d331c9012e0c1ddc0e42364","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/bfa9d86d39a0fe4685f90c3529aa9bd62a9d97a8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/bb336cd8d5ecb69c430ebe3e7bcff68471d93fa8","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/dd292e884c649f9b1c18af0ec75ca90b390cd044","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/934212a623cbab851848b6de377eb476718c3e4c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/5e6013ae2c8d420faea553d363935f65badd32c3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/9806c2393cd2ab0a8e7bb9ffae02ce20e3112ec4","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/996997d1fb2126feda550d6adcedcbd94911fc69","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/3cfcfc102a5e57b021b786a755a38935e357797d","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T00:34:52.507Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-27388","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T15:43:49.125516Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:33:28.640Z"}}]}}}