{"id":"CVE-2024-38585","state":"PUBLISHED","title":"tools/nolibc/stdlib: fix memory error in realloc()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ntools/nolibc/stdlib: fix memory error in realloc()\n\nPass user_p_len to memcpy() instead of heap->len to prevent realloc()\nfrom copying an extra sizeof(heap) bytes from beyond the allocated\nregion.","publishedAt":"2024-06-19T13:37:41.170Z","updatedAt":"2026-05-11T20:19:34.175Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"5996b2b2dac739f2a27da13de8eee5b85b2550b3","versionType":"git"},{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"f678c3c336559cf3255a32153e9a17c1be4e7c15","versionType":"git"},{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"8019d3dd921f39a237a9fab6d2ce716bfac0f983","versionType":"git"},{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"4e6f225aefeb712cdb870176b6621f02cf235b8c","versionType":"git"},{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"791f4641142e2aced85de082e5783b4fb0b977c2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["tools/include/nolibc/stdlib.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"6.1.93","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.33","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.12","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9.3","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":["tools/include/nolibc/stdlib.h"]}],"references":["https://git.kernel.org/stable/c/5996b2b2dac739f2a27da13de8eee5b85b2550b3","https://git.kernel.org/stable/c/f678c3c336559cf3255a32153e9a17c1be4e7c15","https://git.kernel.org/stable/c/8019d3dd921f39a237a9fab6d2ce716bfac0f983","https://git.kernel.org/stable/c/4e6f225aefeb712cdb870176b6621f02cf235b8c","https://git.kernel.org/stable/c/791f4641142e2aced85de082e5783b4fb0b977c2"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/38xxx/CVE-2024-38585.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-38585","state":"PUBLISHED","datePublished":"2024-06-19T13:37:41.170Z","dateUpdated":"2026-05-11T20:19:34.175Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-18T19:36:34.929Z"},"containers":{"cna":{"title":"tools/nolibc/stdlib: fix memory error in realloc()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ntools/nolibc/stdlib: fix memory error in realloc()\n\nPass user_p_len to memcpy() instead of heap->len to prevent realloc()\nfrom copying an extra sizeof(heap) bytes from beyond the allocated\nregion."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"5996b2b2dac739f2a27da13de8eee5b85b2550b3","versionType":"git"},{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"f678c3c336559cf3255a32153e9a17c1be4e7c15","versionType":"git"},{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"8019d3dd921f39a237a9fab6d2ce716bfac0f983","versionType":"git"},{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"4e6f225aefeb712cdb870176b6621f02cf235b8c","versionType":"git"},{"version":"0e0ff638400be8f497a35b51a4751fd823f6bd6a","status":"affected","lessThan":"791f4641142e2aced85de082e5783b4fb0b977c2","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["tools/include/nolibc/stdlib.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","versionType":"semver"},{"version":"6.1.93","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.33","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.12","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9.3","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":["tools/include/nolibc/stdlib.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/5996b2b2dac739f2a27da13de8eee5b85b2550b3"},{"url":"https://git.kernel.org/stable/c/f678c3c336559cf3255a32153e9a17c1be4e7c15"},{"url":"https://git.kernel.org/stable/c/8019d3dd921f39a237a9fab6d2ce716bfac0f983"},{"url":"https://git.kernel.org/stable/c/4e6f225aefeb712cdb870176b6621f02cf235b8c"},{"url":"https://git.kernel.org/stable/c/791f4641142e2aced85de082e5783b4fb0b977c2"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T20:19:34.175Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.1.93"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.6.33"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.8.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.9.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/5996b2b2dac739f2a27da13de8eee5b85b2550b3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/f678c3c336559cf3255a32153e9a17c1be4e7c15","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/8019d3dd921f39a237a9fab6d2ce716bfac0f983","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/4e6f225aefeb712cdb870176b6621f02cf235b8c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/791f4641142e2aced85de082e5783b4fb0b977c2","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:12:25.876Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-38585","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:13:53.564231Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:34:55.212Z"}}]}}}