{"id":"CVE-2024-40917","summary":"memblock: make memblock_set_node() also warn about use of MAX_NUMNODES","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmemblock: make memblock_set_node() also warn about use of MAX_NUMNODES\n\nOn an (old) x86 system with SRAT just covering space above 4Gb:\n\n    ACPI: SRAT: Node 0 PXM 0 [mem 0x100000000-0xfffffffff] hotplug\n\nthe commit referenced below leads to this NUMA configuration no longer\nbeing refused by a CONFIG_NUMA=y kernel (previously\n\n    NUMA: nodes only cover 6144MB of your 8185MB e820 RAM. Not used.\n    No NUMA configuration found\n    Faking a node at [mem 0x0000000000000000-0x000000027fffffff]\n\nwas seen in the log directly after the message quoted above), because of\nmemblock_validate_numa_coverage() checking for NUMA_NO_NODE (only). This\nin turn led to memblock_alloc_range_nid()'s warning about MAX_NUMNODES\ntriggering, followed by a NULL deref in memmap_init() when trying to\naccess node 64's (NODE_SHIFT=6) node data.\n\nTo compensate said change, make memblock_set_node() warn on and adjust\na passed in value of MAX_NUMNODES, just like various other functions\nalready do.","modified":"2026-05-07T04:18:31.427975Z","published":"2024-07-12T12:25:00.175Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40917.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/22f742b8f738918f683198a18ec3c691acda14c4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/4ddb7f966f3d06fcf1ba5ee298af6714b593584b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e0eec24e2e199873f43df99ec39773ad3af2bff7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40917.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40917"},{"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":"6fdc770506eb8379bf68a49d4e193c8364ac64e0"},{"fixed":"4ddb7f966f3d06fcf1ba5ee298af6714b593584b"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"ff6c3d81f2e86b63a3a530683f89ef393882782a"},{"fixed":"22f742b8f738918f683198a18ec3c691acda14c4"},{"fixed":"e0eec24e2e199873f43df99ec39773ad3af2bff7"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-40917.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.6.72"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.9.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-40917.json"}}],"schema_version":"1.7.5"}