{"id":"CVE-2026-23359","aliases":["CVE-2026-23359"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Fix stack-out-of-bounds write in devmap","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix stack-out-of-bounds write in devmap\n\nget_upper_ifindexes() iterates over all upper devices and writes their\nindices into an array without checking bounds.\n\nAlso the callers assume that the max number of upper devices is\nMAX_NEST_DEV and allocate excluded_devices[1+MAX_NEST_DEV] on the stack,\nbut that assumption is not correct and the number of upper devices could\nbe larger than MAX_NEST_DEV (e.g., many macvlans), causing a\nstack-out-of-bounds write.\n\nAdd a max parameter to get_upper_ifindexes() to avoid the issue.\nWhen there are too many upper devices, return -EOVERFLOW and abort the\nredirect.\n\nTo reproduce, create more than MAX_NEST_DEV(8) macvlans on a device with\nan XDP program attached using BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS.\nThen send a packet to the device to trigger the XDP redirect path.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix stack-out-of-bounds write in devmap\n\nget_upper_ifindexes() iterates over all upper devices and writes their\nindices into an array without checking bounds.\n\nAlso the callers assume that the max number of upper devices is\nMAX_NEST_DEV and allocate excluded_devices[1+MAX_NEST_DEV] on the stack,\nbut that assumption is not correct and the number of upper devices could\nbe larger than MAX_NEST_DEV (e.g., many macvlans), causing a\nstack-out-of-bounds write.\n\nAdd a max parameter to get_upper_ifindexes() to avoid the issue.\nWhen there are too many upper devices, return -EOVERFLOW and abort the\nredirect.\n\nTo reproduce, create more than MAX_NEST_DEV(8) macvlans on a device with\nan XDP program attached using BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS.\nThen send a packet to the device to trigger the XDP redirect path.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nbpf: Corrección de escritura fuera de límites de la pila en devmap\n\nget_upper_ifindexes() itera sobre todos los dispositivos superiores y escribe sus índices en un array sin comprobar los límites.\n\nAdemás, los llamadores asumen que el número máximo de dispositivos superiores es MAX_NEST_DEV y asignan excluded_devices[1+MAX_NEST_DEV] en la pila, pero esa suposición no es correcta y el número de dispositivos superiores podría ser mayor que MAX_NEST_DEV (por ejemplo, muchas macvlans), causando una escritura fuera de límites de la pila.\n\nAñadir un parámetro max a get_upper_ifindexes() para evitar el problema.\nCuando hay demasiados dispositivos superiores, devolver -EOVERFLOW y abortar la redirección.\n\nPara reproducir, crear más de MAX_NEST_DEV(8) macvlans en un dispositivo con un programa XDP adjunto usando BPF_F_BROADCAST | BPF_F_EXCLUDE_INGRESS.\nLuego enviar un paquete al dispositivo para activar la ruta de redirección XDP.","source":"nvd"}],"published":"2026-03-25T10:27:43.070Z","modified":"2026-11-10T13:18:42.683Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"aeea1b86f9363f3feabb496534d886f082a89f21","fixed":"88df604f0d16a692867582350ce3f2fcd22243f1","status":"affected"},{"type":"git","introduced":"aeea1b86f9363f3feabb496534d886f082a89f21","fixed":"5000e40acc8d0c36ab709662e32120986ac22e7e","status":"affected"},{"type":"git","introduced":"aeea1b86f9363f3feabb496534d886f082a89f21","fixed":"8a95fb9df1105b1618872c2846a6c01e3ba20b45","status":"affected"},{"type":"git","introduced":"aeea1b86f9363f3feabb496534d886f082a89f21","fixed":"d2c31d8e03d05edc16656e5ffe187f0d1da763d7","status":"affected"},{"type":"git","introduced":"aeea1b86f9363f3feabb496534d886f082a89f21","fixed":"75d474702b2ba8b6bcb26eb3004dbc5e95ffd5d2","status":"affected"},{"type":"git","introduced":"aeea1b86f9363f3feabb496534d886f082a89f21","fixed":"ca831567908fd3f73cf97d8a6c09a5054697a182","status":"affected"},{"type":"git","introduced":"aeea1b86f9363f3feabb496534d886f082a89f21","fixed":"b7bf516c3ecd9a2aae2dc2635178ab87b734fef1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.15","status":"unaffected"},{"type":"semver","introduced":"5.15.203","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.167","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.130","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.77","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.17","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.7","lastAffected":"6.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.15.1","fixed":"5.15.203"},{"status":"affected","introduced":"5.16","fixed":"6.1.167"},{"status":"affected","introduced":"6.2","fixed":"6.6.130"},{"status":"affected","introduced":"6.7","fixed":"6.12.77"},{"status":"affected","introduced":"6.13","fixed":"6.18.17"},{"status":"affected","introduced":"6.19","fixed":"6.19.7"},{"status":"affected","version":"5.15"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"},{"status":"affected","version":"7.0"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/88df604f0d16a692867582350ce3f2fcd22243f1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5000e40acc8d0c36ab709662e32120986ac22e7e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8a95fb9df1105b1618872c2846a6c01e3ba20b45","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d2c31d8e03d05edc16656e5ffe187f0d1da763d7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/75d474702b2ba8b6bcb26eb3004dbc5e95ffd5d2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ca831567908fd3f73cf97d8a6c09a5054697a182","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b7bf516c3ecd9a2aae2dc2635178ab87b734fef1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-082556.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-784472.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T21:28:04.432Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23359","url":"https://www.cve.org/CVERecord?id=CVE-2026-23359","licence":"CVE Terms of Use","modified":"2026-11-10T12:42:42.128Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23359","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23359","licence":"Public domain","modified":"2026-11-10T13:18:42.683Z"}],"updatedAt":"2026-11-25T22:59:16.690Z","epss":{"score":0.00213,"percentile":0.06612,"date":"2026-11-30T12:00:22.000Z"}}