CVE-2026-98376 (GCVE-0-2026-98376)
Vulnerability from cvelistv5
Published
2026-10-09 07:34
Modified
2026-10-24 14:08
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
bpf: Use array_map_meta_equal for percpu array inner map replacement
percpu_array_map_ops.map_meta_equal points to the generic
bpf_map_meta_equal(), which does not compare max_entries. When a
percpu array serves as an inner map, replacing it with one that has
fewer max_entries bypasses the check. Since percpu_array_map_gen_lookup()
inlines the original template's index_mask as a JIT immediate, a lookup
on the replacement map can access pptrs[] out of bounds.
Point percpu_array_map_ops.map_meta_equal to array_map_meta_equal(),
which already enforces the max_entries equality check.
Add a selftest to verify that replacing a percpu array inner map with
a differently-sized one is rejected.
References
Impacted products
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"kernel/bpf/arraymap.c",
"tools/testing/selftests/bpf/prog_tests/percpu_array_inner_map.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "593980175389a05793f6060aa20e626330960395",
"status": "affected",
"version": "db69718b8efac802c7cc20d5a6c7dfc913f99c43",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"kernel/bpf/arraymap.c",
"tools/testing/selftests/bpf/prog_tests/percpu_array_inner_map.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "6.10"
},
{
"lessThan": "6.10",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "7.1",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "7.1",
"versionStartIncluding": "6.10",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Use array_map_meta_equal for percpu array inner map replacement\n\npercpu_array_map_ops.map_meta_equal points to the generic\nbpf_map_meta_equal(), which does not compare max_entries. When a\npercpu array serves as an inner map, replacing it with one that has\nfewer max_entries bypasses the check. Since percpu_array_map_gen_lookup()\ninlines the original template\u0027s index_mask as a JIT immediate, a lookup\non the replacement map can access pptrs[] out of bounds.\n\nPoint percpu_array_map_ops.map_meta_equal to array_map_meta_equal(),\nwhich already enforces the max_entries equality check.\n\nAdd a selftest to verify that replacing a percpu array inner map with\na differently-sized one is rejected."
}
],
"metrics": [
{
"cvssV3_1": {
"baseScore": 7.8,
"baseSeverity": "HIGH",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"scenarios": [
{
"lang": "en",
"value": "AV:L - The local bpf(BPF_MAP_UPDATE_ELEM) path reaches map_update_elem()-\u003ebpf_map_update_value()-\u003ebpf_fd_array_map_update_elem()-\u003ebpf_map_fd_get_ptr(), where the patched percpu_array_map_ops.map_meta_equal validates the replacement map; no network handler supplies its FD or dimensions.\nAC:L - The attacker chooses the template and replacement max_entries, lookup key, program, and trigger; an index below the template limit but beyond the replacement deterministically reads pptrs[] out of bounds. No race or other actor is required on a JIT-enabled x86-64 or arm64 target.\nPR:L - map_create() places PERCPU_ARRAY and ARRAY_OF_MAPS in its unprivileged branch, and bpf_prog_load() permits SOCKET_FILTER without CAP_BPF when unprivileged BPF is enabled; alternatively, a user-namespace BPF token satisfies the gates without init-namespace root.\nUI:N - The attacker creates and replaces the maps, loads the lookup program, attaches it through SO_ATTACH_BPF to their own socket, and sends the triggering data themselves; no victim action is needed.\nS:U - percpu_array_map_gen_lookup() converts the out-of-bounds pptrs[] slot into a pointer used against the same host kernel\u0027s memory; this is ordinary kernel privilege escalation, not a guest-to-host, IOMMU, or other security-authority crossing.\nC:H - percpu_array_map_gen_lookup() loads a 64-bit pptrs[index] out of bounds and returns its adjusted value as a verifier-trusted map-value pointer. Because bpf_map_area_alloc() kmallocs the flexible object, map spraying can place chosen bytes at that slot, enabling kernel reads copied into another map.\nI:H - The forged PTR_TO_MAP_VALUE is writable because default map flags grant BPF_MAP_CAN_WRITE; direct BPF stores through an attacker-groomed out-of-bounds pptrs[] value therefore provide an arbitrary kernel-write primitive suitable for control-flow hijacking.\nA:H - Without successful grooming, BPF_MOV64_PERCPU_REG adjusts the garbage pointer loaded beyond pptrs[] and the attacker\u0027s next value access dereferences it, causing a kernel oops or panic; the attacker can repeatedly run the same socket-filter program."
}
]
}
],
"providerMetadata": {
"dateUpdated": "2026-10-24T14:08:36.004Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/593980175389a05793f6060aa20e626330960395"
}
],
"title": "bpf: Use array_map_meta_equal for percpu array inner map replacement",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2026-98376",
"datePublished": "2026-10-09T07:34:17.043Z",
"dateReserved": "2026-09-25T10:25:14.345Z",
"dateUpdated": "2026-10-24T14:08:36.004Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…