{"id":"CVE-2024-38543","summary":"lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure","details":"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.","modified":"2026-04-16T04:39:33.108044842Z","published":"2024-06-19T13:35:17.994Z","related":["ALSA-2024:4583","SUSE-SU-2024:2571-1","SUSE-SU-2024:2896-1","SUSE-SU-2024:2973-1","SUSE-SU-2025:20008-1","SUSE-SU-2025:20028-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/38xxx/CVE-2024-38543.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/1a21fdeea502658e315bd939409b755974f4fb64"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/65e528a69cb3ed4a286c45b4afba57461c8b5b33"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c2af060d1c18beaec56351cf9c9bcbbc5af341a3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ce47e8ead9a72834cc68431d53f8092ce69bebb7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/38xxx/CVE-2024-38543.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-38543"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b2ef9f5a5cb37643ca5def3516c546457074b882"},{"fixed":"1a21fdeea502658e315bd939409b755974f4fb64"},{"fixed":"65e528a69cb3ed4a286c45b4afba57461c8b5b33"},{"fixed":"ce47e8ead9a72834cc68431d53f8092ce69bebb7"},{"fixed":"3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc"},{"fixed":"c2af060d1c18beaec56351cf9c9bcbbc5af341a3"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-38543.json"}}],"schema_version":"1.7.5"}