{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-38543","id":"CVE-2024-38543","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 ","descriptionLong":"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.","published":"2024-06-19T13:35:17.994Z","updated":"2026-10-28T02:30:27.989256166Z","reserved":"2024-06-18T19:36:34.919Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","lessThan":"1a21fdeea502658e315bd939409b755974f4fb64","status":"affected","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","lessThan":"65e528a69cb3ed4a286c45b4afba57461c8b5b33","status":"affected","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","lessThan":"ce47e8ead9a72834cc68431d53f8092ce69bebb7","status":"affected","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","lessThan":"3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc","status":"affected","versionType":"git"},{"version":"b2ef9f5a5cb37643ca5def3516c546457074b882","lessThan":"c2af060d1c18beaec56351cf9c9bcbbc5af341a3","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","lessThan":"5.8","status":"unaffected","versionType":"semver"},{"version":"6.1.93","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.33","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.8.12","lessThanOrEqual":"6.8.*","status":"unaffected","versionType":"semver"},{"version":"6.9.3","lessThanOrEqual":"6.9.*","status":"unaffected","versionType":"semver"},{"version":"6.10","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-476"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/1a21fdeea502658e315bd939409b755974f4fb64","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/65e528a69cb3ed4a286c45b4afba57461c8b5b33","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/ce47e8ead9a72834cc68431d53f8092ce69bebb7","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/3b20d18f475bd17309db640dbe7d7c7ebb5bc2bc","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/c2af060d1c18beaec56351cf9c9bcbbc5af341a3","tags":["x_transferred","Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/38xxx/CVE-2024-38543.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-38543","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00241,"epssPercentile":0.15409,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-38543","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-38543","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-38543","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-38543","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}