{"id":"CVE-2024-39478","state":"PUBLISHED","title":"crypto: starfive - Do not free stack buffer","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: starfive - Do not free stack buffer\n\nRSA text data uses variable length buffer allocated in software stack.\nCalling kfree on it causes undefined behaviour in subsequent operations.","publishedAt":"2024-07-05T06:55:07.936Z","updatedAt":"2026-09-02T12:49:12.242Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/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":"445a4aaf5842073e4130b1d6dbe3785284d9615f","status":"affected","lessThan":"bfd861dadd3a45de257b3d328bf49b64a6f9c5f1","versionType":"git"},{"version":"445a4aaf5842073e4130b1d6dbe3785284d9615f","status":"affected","lessThan":"5944de192663f272033501dcd322b008fca72006","versionType":"git"},{"version":"445a4aaf5842073e4130b1d6dbe3785284d9615f","status":"affected","lessThan":"d7f01649f4eaf1878472d3d3f480ae1e50d98f6c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/starfive/jh7110-rsa.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.156","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.5","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/starfive/jh7110-rsa.c"]}],"references":["https://git.kernel.org/stable/c/bfd861dadd3a45de257b3d328bf49b64a6f9c5f1","https://git.kernel.org/stable/c/5944de192663f272033501dcd322b008fca72006","https://git.kernel.org/stable/c/d7f01649f4eaf1878472d3d3f480ae1e50d98f6c"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/39xxx/CVE-2024-39478.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-39478","state":"PUBLISHED","datePublished":"2024-07-05T06:55:07.936Z","dateUpdated":"2026-09-02T12:49:12.242Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-25T14:23:23.746Z"},"containers":{"cna":{"title":"crypto: starfive - Do not free stack buffer","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: starfive - Do not free stack buffer\n\nRSA text data uses variable length buffer allocated in software stack.\nCalling kfree on it causes undefined behaviour in subsequent operations."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"445a4aaf5842073e4130b1d6dbe3785284d9615f","status":"affected","lessThan":"bfd861dadd3a45de257b3d328bf49b64a6f9c5f1","versionType":"git"},{"version":"445a4aaf5842073e4130b1d6dbe3785284d9615f","status":"affected","lessThan":"5944de192663f272033501dcd322b008fca72006","versionType":"git"},{"version":"445a4aaf5842073e4130b1d6dbe3785284d9615f","status":"affected","lessThan":"d7f01649f4eaf1878472d3d3f480ae1e50d98f6c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/starfive/jh7110-rsa.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.156","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.9.5","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/crypto/starfive/jh7110-rsa.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bfd861dadd3a45de257b3d328bf49b64a6f9c5f1"},{"url":"https://git.kernel.org/stable/c/5944de192663f272033501dcd322b008fca72006"},{"url":"https://git.kernel.org/stable/c/d7f01649f4eaf1878472d3d3f480ae1e50d98f6c"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code is reached through the keyctl() syscall (KEYCTL_PKEY_ENCRYPT/DECRYPT/SIGN/VERIFY) on a locally added asymmetric key, requiring local access to the affected StarFive JH7110 system. No network-facing kernel path drives akcipher RSA operations.\nAC:L - The invalid kfree() executes unconditionally on every RSA operation, on both the success and error paths, so the attacker triggers it deterministically with a single syscall and can repeat it arbitrarily to groom the slab. The attacker also controls the contents of the wrongly-freed memory, since the RSA plaintext is copied into rsa_data.\nPR:L - Any unprivileged user can add an X.509/asymmetric key to their own session keyring and invoke KEYCTL_PKEY_* on it; the only check is KEY_NEED_SEARCH on a key they own, with no capability requirement.\nUI:N - Exploitation is entirely attacker-driven via syscalls in the attacker's own process; no victim action or interaction is needed.\nS:U - The corruption is confined to the kernel's own slab allocator within the same security authority; there is no VM, IOMMU, or sandbox boundary crossed.\nC:H - Freeing an interior pointer places a misaligned address on the SLUB freelist, so a subsequent allocation overlaps the still-live request buffer, yielding attacker-readable aliasing of kernel heap memory that can be leveraged for arbitrary kernel memory disclosure.\nI:H - The invalid free writes a freepointer into the middle of a live object and creates overlapping/double-freed allocations whose contents the attacker controls, a classic heap-corruption primitive leading to arbitrary write and privilege escalation.\nA:H - Freelist corruption from freeing a non-slab-aligned pointer reliably causes kernel oops/panic, and the operation can be repeated at will to guarantee a crash."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-09-02T12:49:12.242Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.6.156"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.9.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.5","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-07-08T14:13:27.969943Z","id":"CVE-2024-39478","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-07-08T14:13:38.169Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/5944de192663f272033501dcd322b008fca72006","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/d7f01649f4eaf1878472d3d3f480ae1e50d98f6c","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:26:16.166Z"}}]}}}