{"id":"CVE-2024-38543","aliases":["CVE-2024-38543"],"related":[],"kind":"vulnerability","state":"published","title":"lib/test_hmm.c: handle src_pfns and dst_pfns allocation failure","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: lib/test_hmm.c: maneja el error de asignación de src_pfns y dst_pfns El kcalloc() en dmirror_device_evict_chunk() devolverá nulo si la memoria física se ha agotado. Como resultado, si se desreferencia src_pfns o dst_pfns, se producirá el error de desreferencia del puntero nulo. Además, el dispositivo va a desaparecer. Si kcalloc() falla, las páginas que asignan un fragmento no podrán ser desalojadas. Entonces agregue una bandera __GFP_NOFAIL en kcalloc(). Finalmente, como no es necesario tener memoria físicamente contigua, cambie kcalloc() a kvcalloc() para evitar asignaciones fallidas.","source":"nvd"}],"published":"2024-06-19T13:35:17.994Z","modified":"2026-06-17T07:40:30.597Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"b2ef9f5a5cb37643ca5def3516c546457074b882","fixed":"1a21fdeea502658e315bd939409b755974f4fb64","status":"affected"},{"type":"git","introduced":"b2ef9f5a5cb37643ca5def3516c546457074b882","fixed":"65e528a69cb3ed4a286c45b4afba57461c8b5b33","status":"affected"},{"type":"git","introduced":"b2ef9f5a5cb37643ca5def3516c546457074b882","fixed":"ce47e8ead9a72834cc68431d53f8092ce69bebb7","status":"affected"},{"type":"git","introduced":"b2ef9f5a5cb37643ca5def3516c546457074b882","fixed":"3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc","status":"affected"},{"type":"git","introduced":"b2ef9f5a5cb37643ca5def3516c546457074b882","fixed":"c2af060d1c18beaec56351cf9c9bcbbc5af341a3","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.8","status":"unaffected"},{"type":"semver","introduced":"6.1.93","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.33","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.8.12","lastAffected":"6.8.*","status":"unaffected"},{"type":"semver","introduced":"6.9.3","lastAffected":"6.9.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.10","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.8","fixed":"6.1.93"},{"status":"affected","introduced":"6.2","fixed":"6.6.33"},{"status":"affected","introduced":"6.7","fixed":"6.8.12"},{"status":"affected","introduced":"6.9","fixed":"6.9.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/1a21fdeea502658e315bd939409b755974f4fb64","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/65e528a69cb3ed4a286c45b4afba57461c8b5b33","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ce47e8ead9a72834cc68431d53f8092ce69bebb7","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c2af060d1c18beaec56351cf9c9bcbbc5af341a3","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T17:15:10.301Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-38543","url":"https://www.cve.org/CVERecord?id=CVE-2024-38543","licence":"CVE Terms of Use","modified":"2026-05-11T20:18:42.570Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-38543","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-38543","licence":"Public domain","modified":"2026-06-17T07:40:30.597Z"}],"updatedAt":"2026-11-25T22:58:42.007Z","epss":{"score":0.00308,"percentile":0.16073,"date":"2026-11-30T12:00:22.000Z"}}