CVE-2026-23359

Source
https://cve.org/CVERecord?id=CVE-2026-23359
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-23359.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-23359
Downstream
Published
2026-03-25T10:27:43.070Z
Modified
2026-04-14T03:47:51.163878Z
Summary
bpf: Fix stack-out-of-bounds write in devmap
Details

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix stack-out-of-bounds write in devmap

getupperifindexes() iterates over all upper devices and writes their indices into an array without checking bounds.

Also the callers assume that the max number of upper devices is MAXNESTDEV and allocate excludeddevices[1+MAXNESTDEV] on the stack, but that assumption is not correct and the number of upper devices could be larger than MAXNEST_DEV (e.g., many macvlans), causing a stack-out-of-bounds write.

Add a max parameter to getupperifindexes() to avoid the issue. When there are too many upper devices, return -EOVERFLOW and abort the redirect.

To reproduce, create more than MAXNESTDEV(8) macvlans on a device with an XDP program attached using BPFFBROADCAST | BPFFEXCLUDE_INGRESS. Then send a packet to the device to trigger the XDP redirect path.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23359.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / 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
aeea1b86f9363f3feabb496534d886f082a89f21
Fixed
5000e40acc8d0c36ab709662e32120986ac22e7e
Fixed
8a95fb9df1105b1618872c2846a6c01e3ba20b45
Fixed
d2c31d8e03d05edc16656e5ffe187f0d1da763d7
Fixed
75d474702b2ba8b6bcb26eb3004dbc5e95ffd5d2
Fixed
ca831567908fd3f73cf97d8a6c09a5054697a182
Fixed
b7bf516c3ecd9a2aae2dc2635178ab87b734fef1

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-23359.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.15.0
Fixed
6.1.167
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.130
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.77
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.18.17
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
6.19.7

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-23359.json"