{"id":"CVE-2024-38543","state":"PUBLISHED","title":"lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nlib/test_hmm.c: handle src_pfns and dst_pfns allocation failure\n\nThe kcalloc() in dmirror_device_evict_chunk() will return null if the\nphysical memory has run out.  As a result, if src_pfns or dst_pfns is\ndereferenced, the null pointer dereference bug will happen.\n\nMoreover, the device is going away.  If the kcalloc() fails, the pages\nmapping a chunk could not be evicted.  So add a __GFP_NOFAIL flag in\nkcalloc().\n\nFinally, as there is no need to have physically contiguous memory, Switch\nkcalloc() to kvcalloc() in order to avoid failing allocations.","publishedAt":"2024-06-19T13:35:17.994Z","updatedAt":"2026-05-11T20:18:42.570Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"1a21fdeea502658e315bd939409b755974f4fb64","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"65e528a69cb3ed4a286c45b4afba57461c8b5b33","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"ce47e8ead9a72834cc68431d53f8092ce69bebb7","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"c2af060d1c18beaec56351cf9c9bcbbc5af341a3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/test_hmm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","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":["lib/test_hmm.c"]}],"references":["https://git.kernel.org/stable/c/1a21fdeea502658e315bd939409b755974f4fb64","https://git.kernel.org/stable/c/65e528a69cb3ed4a286c45b4afba57461c8b5b33","https://git.kernel.org/stable/c/ce47e8ead9a72834cc68431d53f8092ce69bebb7","https://git.kernel.org/stable/c/3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc","https://git.kernel.org/stable/c/c2af060d1c18beaec56351cf9c9bcbbc5af341a3"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/38xxx/CVE-2024-38543.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-38543","state":"PUBLISHED","datePublished":"2024-06-19T13:35:17.994Z","dateUpdated":"2026-05-11T20:18:42.570Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-06-18T19:36:34.919Z"},"containers":{"cna":{"title":"lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nlib/test_hmm.c: handle src_pfns and dst_pfns allocation failure\n\nThe kcalloc() in dmirror_device_evict_chunk() will return null if the\nphysical memory has run out.  As a result, if src_pfns or dst_pfns is\ndereferenced, the null pointer dereference bug will happen.\n\nMoreover, the device is going away.  If the kcalloc() fails, the pages\nmapping a chunk could not be evicted.  So add a __GFP_NOFAIL flag in\nkcalloc().\n\nFinally, as there is no need to have physically contiguous memory, Switch\nkcalloc() to kvcalloc() in order to avoid failing allocations."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"1a21fdeea502658e315bd939409b755974f4fb64","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"65e528a69cb3ed4a286c45b4afba57461c8b5b33","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"ce47e8ead9a72834cc68431d53f8092ce69bebb7","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","status":"affected","lessThan":"c2af060d1c18beaec56351cf9c9bcbbc5af341a3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["lib/test_hmm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","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":["lib/test_hmm.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/1a21fdeea502658e315bd939409b755974f4fb64"},{"url":"https://git.kernel.org/stable/c/65e528a69cb3ed4a286c45b4afba57461c8b5b33"},{"url":"https://git.kernel.org/stable/c/ce47e8ead9a72834cc68431d53f8092ce69bebb7"},{"url":"https://git.kernel.org/stable/c/3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc"},{"url":"https://git.kernel.org/stable/c/c2af060d1c18beaec56351cf9c9bcbbc5af341a3"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T20:18:42.570Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.1.93"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.6.33"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.8.12"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.9.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/1a21fdeea502658e315bd939409b755974f4fb64","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/65e528a69cb3ed4a286c45b4afba57461c8b5b33","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/ce47e8ead9a72834cc68431d53f8092ce69bebb7","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/c2af060d1c18beaec56351cf9c9bcbbc5af341a3","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:12:25.183Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-38543","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:15:10.301202Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:34:58.014Z"}}]}}}