bpf: Fix overflow of jump offset in constant blinding
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 7.2.10
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix overflow of jump offset in constant blinding bpf_jit_blind_insn() rewrites 'if rX op imm goto off' into: AX = imm ^ rnd AX ^= rnd if rX op AX goto off and subtracts 2 from off when the jump is backward. off is s16, so -32767 and -32768 wrap and the jump goes 32767 insns forward, past the end of the prog. The jump is inside the patch, hence bpf_adj_branches() doesn't check it. The kernel crashes when such prog runs with bpf_jit_harden=2. Return -ERANGE in such case. bpf_jit_blind_constants() fails the same way when blinding of other insns moves a jump out of range.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 4f3446bb809f20ad56cadf712e6006815ae7a8f9 · fixed in 443328237113ee0ea515e506497334d871dbc2aa; From 4f3446bb809f20ad56cadf712e6006815ae7a8f9 · fixed in ad139384ecddb6f3e7e3c3c12765aafae0e39670
- Linux Linux
4.7
- KernelLinux
From 4.7.0 · fixed in 7.2.10