Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Reject MEM_ALLOC BTF accesses past object bounds BTF struct walks relax the struct-size check for accesses through a trailing flexible array. That is valid for ordinary BTF type walking, but PTR_TO_BTF_ID | MEM_ALLOC values point to objects allocated with the static BTF type size. When walking a MEM_ALLOC object, reject the access before applying the flexible-array relaxation if the access range extends past the struct size. Apply the same policy to struct ID matching so kfunc and kptr type checks do not walk past the allocated object bounds either.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
958cf2e273f0929c66169e0788031310e8118722 to < 94033c193bc38794511b2ebfa3dc0287d3b2bf60affected958cf2e273f0929c66169e0788031310e8118722 to < 90d36e825da4fadeede64784ceda975ab7b31dabaffected958cf2e273f0929c66169e0788031310e8118722 to < cf08ff2255de98cfcbc8bf7236fbeb38f0d5b4f1affected958cf2e273f0929c66169e0788031310e8118722 to < e626a50d07d43421cbf7bfb5a084b33a5e276b6eaffected958cf2e273f0929c66169e0788031310e8118722 to < 9c9ee0324c774490ae953162aaaf4561d222bd93affected
Linux Linux
Default version status: affected
6.2affected0 to < 6.2unaffected6.6.160 to ≤ 6.6.*unaffected6.12.114 to ≤ 6.12.*unaffected6.18.57 to ≤ 6.18.*unaffected7.2.6 to ≤ 7.2.*unaffected7.3 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/94033c193bc38794511b2ebfa3dc0287d3b2bf60 ↗
- https://git.kernel.org/stable/c/90d36e825da4fadeede64784ceda975ab7b31dab ↗
- https://git.kernel.org/stable/c/cf08ff2255de98cfcbc8bf7236fbeb38f0d5b4f1 ↗
- https://git.kernel.org/stable/c/e626a50d07d43421cbf7bfb5a084b33a5e276b6e ↗
- https://git.kernel.org/stable/c/9c9ee0324c774490ae953162aaaf4561d222bd93 ↗