{"id":"CVE-2024-36918","state":"PUBLISHED","title":"bpf: Check bloom filter map value size","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Check bloom filter map value size\n\nThis patch adds a missing check to bloom filter creating, rejecting\nvalues above KMALLOC_MAX_SIZE. This brings the bloom map in line with\nmany other map types.\n\nThe lack of this protection can cause kernel crashes for value sizes\nthat overflow int's. Such a crash was caught by syzkaller. The next\npatch adds more guard-rails at a lower level.","publishedAt":"2024-05-30T15:29:13.904Z","updatedAt":"2026-08-05T11:32:03.979Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9330986c03006ab1d33d243b7cfe598a7a3c1baa","status":"affected","lessThan":"fa6995eeb62e74b5a1480c73fb7b420c270784d3","versionType":"git"},{"version":"9330986c03006ab1d33d243b7cfe598a7a3c1baa","status":"affected","lessThan":"608e13706c8b6c658a0646f09ebced74ec367f7c","versionType":"git"},{"version":"9330986c03006ab1d33d243b7cfe598a7a3c1baa","status":"affected","lessThan":"c418afb9bf23e2f2b76cb819601e4a5d9dbab42d","versionType":"git"},{"version":"9330986c03006ab1d33d243b7cfe598a7a3c1baa","status":"affected","lessThan":"a8d89feba7e54e691ca7c4efc2a6264fa83f3687","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/bloom_filter.c","tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.91","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.31","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.10","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/bloom_filter.c","tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c"]}],"references":["https://git.kernel.org/stable/c/fa6995eeb62e74b5a1480c73fb7b420c270784d3","https://git.kernel.org/stable/c/608e13706c8b6c658a0646f09ebced74ec367f7c","https://git.kernel.org/stable/c/c418afb9bf23e2f2b76cb819601e4a5d9dbab42d","https://git.kernel.org/stable/c/a8d89feba7e54e691ca7c4efc2a6264fa83f3687"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:30.303Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/36xxx/CVE-2024-36918.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-36918","state":"PUBLISHED","datePublished":"2024-05-30T15:29:13.904Z","dateUpdated":"2026-08-05T11:32:03.979Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-05-30T15:25:07.068Z"},"containers":{"cna":{"title":"bpf: Check bloom filter map value size","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Check bloom filter map value size\n\nThis patch adds a missing check to bloom filter creating, rejecting\nvalues above KMALLOC_MAX_SIZE. This brings the bloom map in line with\nmany other map types.\n\nThe lack of this protection can cause kernel crashes for value sizes\nthat overflow int's. Such a crash was caught by syzkaller. The next\npatch adds more guard-rails at a lower level."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9330986c03006ab1d33d243b7cfe598a7a3c1baa","status":"affected","lessThan":"fa6995eeb62e74b5a1480c73fb7b420c270784d3","versionType":"git"},{"version":"9330986c03006ab1d33d243b7cfe598a7a3c1baa","status":"affected","lessThan":"608e13706c8b6c658a0646f09ebced74ec367f7c","versionType":"git"},{"version":"9330986c03006ab1d33d243b7cfe598a7a3c1baa","status":"affected","lessThan":"c418afb9bf23e2f2b76cb819601e4a5d9dbab42d","versionType":"git"},{"version":"9330986c03006ab1d33d243b7cfe598a7a3c1baa","status":"affected","lessThan":"a8d89feba7e54e691ca7c4efc2a6264fa83f3687","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/bloom_filter.c","tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.16","versionType":"semver"},{"version":"6.1.91","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.31","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.8.10","status":"unaffected","lessThanOrEqual":"6.8.*","versionType":"semver"},{"version":"6.9","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/bloom_filter.c","tools/testing/selftests/bpf/prog_tests/bloom_filter_map.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/fa6995eeb62e74b5a1480c73fb7b420c270784d3"},{"url":"https://git.kernel.org/stable/c/608e13706c8b6c658a0646f09ebced74ec367f7c"},{"url":"https://git.kernel.org/stable/c/c418afb9bf23e2f2b76cb819601e4a5d9dbab42d"},{"url":"https://git.kernel.org/stable/c/a8d89feba7e54e691ca7c4efc2a6264fa83f3687"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is reached purely through the `bpf()` syscall — `BPF_MAP_CREATE` for a bloom-filter map with an oversized `value_size`, then `BPF_PROG_LOAD` of a program calling `bpf_map_push_elem()` on it. No network or remote-peer input is involved.\nAC:L - Triggering is fully deterministic and attacker-controlled: pick any `value_size >= 0x80000000` and any negative stack offset, and the signed overflow in `max_off + access_size` fires every time. There is no race, no timing window, and no memory-layout precondition needed to reach the out-of-bounds loop.\nPR:L - `bpf_map_push_elem` is in the unprivileged section of `bpf_base_func_proto()`, and bloom-filter map creation has no per-map-type capability gate at all on 5.16–6.3 (only `sysctl_unprivileged_bpf_disabled`), while on 6.9 a delegated bpffs BPF token grants `ns_capable(userns, CAP_BPF)` to an unprivileged containerized process. CAP_BPF is a deliberately reduced, non-root privilege routinely held by ordinary service accounts, so a basic low-privileged local context suffices.\nUI:N - The attacker performs the entire sequence — map creation plus program load — from their own process. No other user or administrator has to do anything.\nS:U - The corruption occurs in kernel heap memory belonging to the BPF verifier, within the same security authority as the exploiting process. No hypervisor, IOMMU, or other trust boundary is crossed.\nC:H - The loop performs unbounded negative-index reads of `state->stack[spi].slot_type[]` and `spilled_ptr`, and `mark_reg_read()` chases an out-of-bounds `parent` pointer, giving an out-of-bounds kernel-heap read primitive that a heap-groomed attacker can leverage for arbitrary memory disclosure.\nI:H - With `clobber = true` the loop writes `*stype = STACK_MISC` out of bounds, `__mark_reg_unknown()`/`scrub_spilled_slot()` write a full `bpf_reg_state` and 8-byte slots out of bounds, and `mark_reg_read()` ORs `REG_LIVE_READ64` into an attacker-influenced wild pointer — an out-of-bounds write usable for control-flow hijacking.\nA:H - The overflowed loop iterates roughly two billion times descending ~120 bytes per 8 iterations, so it walks tens of gigabytes below the `stack` allocation and reliably faults on unmapped memory, producing a kernel oops/panic that any local user with map-create access can trigger at will."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:32:03.979Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.1.91"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.6.31"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.8.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.16","versionEndExcluding":"6.9"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/fa6995eeb62e74b5a1480c73fb7b420c270784d3","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/608e13706c8b6c658a0646f09ebced74ec367f7c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/c418afb9bf23e2f2b76cb819601e4a5d9dbab42d","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/a8d89feba7e54e691ca7c4efc2a6264fa83f3687","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T03:43:50.111Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-36918","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T17:16:07.190878Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:35:00.289Z"}}]}}}