qede: fix off-by-one in BD ring consumption on build_skb failure
- 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 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.97, and 2 more
- 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
- Exploitation: none
- Automatable: yes
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: qede: fix off-by-one in BD ring consumption on build_skb failure qede_rx_build_skb() and qede_tpa_rx_build_skb() do not check for a NULL return from qede_build_skb(). When it returns NULL under memory pressure, the functions still consume a BD from the ring before returning NULL. The callers then recycle additional BDs, resulting in one extra BD being consumed (off-by-one). This desynchronizes the BD ring, which can corrupt DMA page reference counts and lead to SLUB freelist corruption. Commit 4e910dbe3650 ("qede: confirm skb is allocated before using") added a NULL check inside qede_build_skb() to prevent a NULL pointer dereference, but did not address the missing NULL checks in the callers, making this off-by-one reachable. Fix this by adding NULL checks for the return value of qede_build_skb() in both qede_rx_build_skb() and qede_tpa_rx_build_skb(), returning NULL immediately before any BD ring manipulation.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: yes · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From 8a8633978b842c88fbcfe00d4e5dde96048f630e · fixed in ecc05d4b20220a09c9c69584fc46ca55248a374a; From 8a8633978b842c88fbcfe00d4e5dde96048f630e · fixed in 07be8b8adf91b7ada4c3dacce064d572a6066421; From 8a8633978b842c88fbcfe00d4e5dde96048f630e · fixed in 1624aa100c0b218181aa74e3696a389b509298cb; From 8a8633978b842c88fbcfe00d4e5dde96048f630e · fixed in 0bf78df2d3ecb1f4964ff42a7327d25845955153; From 8a8633978b842c88fbcfe00d4e5dde96048f630e · fixed in 814a5edac8c9fc04051808d5faaa93768e989281; From 8a8633978b842c88fbcfe00d4e5dde96048f630e · fixed in b066420e57f3402a52c998678b4678252ac9bb63; From 8a8633978b842c88fbcfe00d4e5dde96048f630e · fixed in 982d6d6bc059c5dff37a2201c2f08c14bcfcbd20; From 8a8633978b842c88fbcfe00d4e5dde96048f630e · fixed in a0a558ca7e75b49e71f8c545c30e8c005e6e4e2f
- Linux Linux
4.18
- KernelLinux
From 4.18.0 · fixed in 5.10.261; From 5.11.0 · fixed in 5.15.212; From 5.16.0 · fixed in 6.1.178; From 6.2.0 · fixed in 6.6.145; From 6.7.0 · fixed in 6.12.97; From 6.13.0 · fixed in 6.18.40; From 6.19.0 · fixed in 7.1.5
References 8
git.kernel.org
- stable/c/ecc05d4b20220a09c9c69584fc46ca55248a374a
- stable/c/07be8b8adf91b7ada4c3dacce064d572a6066421
- stable/c/1624aa100c0b218181aa74e3696a389b509298cb
- stable/c/0bf78df2d3ecb1f4964ff42a7327d25845955153
- stable/c/814a5edac8c9fc04051808d5faaa93768e989281
- stable/c/b066420e57f3402a52c998678b4678252ac9bb63
- stable/c/982d6d6bc059c5dff37a2201c2f08c14bcfcbd20
- stable/c/a0a558ca7e75b49e71f8c545c30e8c005e6e4e2f