CVE-2021-47243
published high CVSS 3.1 · 7.1sch_cake: Fix out of bounds when parsing TCP options and header
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux8b7138814f29933898ecd31dfc83e35a30ee69f5 to < 595897ef118d6fe66690c4fc5b572028c9da95b7 · 8b7138814f29933898ecd31dfc83e35a30ee69f5 to < 4cefa061fc63f4d2dff5ab4083f43857cd7a2335 · 8b7138814f29933898ecd31dfc83e35a30ee69f5 to < 3b491dd593d582ceeb27aa617600712a6bd14246 · 8b7138814f29933898ecd31dfc83e35a30ee69f5 to < 3371392c60e2685af30bd4547badd880f5df2b3f · 8b7138814f29933898ecd31dfc83e35a30ee69f5 to < ba91c49dedbde758ba0b72f57ac90b06ddf8e548 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux4.19 (affected) · 0 to < 4.19 (unaffected · semver) · 4.19.196 through 4.19.* (unaffected · semver) · 5.4.128 through 5.4.* (unaffected · semver) · 5.10.46 through 5.10.* (unaffected · semver) · 5.12.13 through 5.12.* (unaffected · semver) · 5.13 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: sch_cake: Fix out of bounds when parsing TCP options and header The TCP option parser in cake qdisc (cake_get_tcpopt and cake_tcph_may_drop) could read one byte out of bounds. When the length is 1, the execution flow gets into the loop, reads one byte of the opcode, and if the opcode is neither TCPOPT_EOL nor TCPOPT_NOP, it reads one more byte, which exceeds the length of 1. This fix is inspired by commit 9609dad263f8 ("ipv4: tcp_input: fix stack out of bounds when parsing TCP options."). v2 changes: Added doff validation in cake_get_tcphdr to avoid parsing garbage as TCP header. Although it wasn't strictly an out-of-bounds access (memory was allocated), garbage values could be read where CAKE expected the TCP header if doff was smaller than 5.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.1 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
- Scenarios
- en: AV:L - The vulnerable TCP option parsers run in the CAKE qdisc (net/sched) during enqueue after the qdisc is attached via tc/netlink; qdisc bugs are local, and an attacker reaches them by configuring cake in a netns and sending crafted packets through it. AC:L - The attacker fully controls qdisc setup (enabling ack_filter) and the TCP option bytes that trigger the length==1 path, so the one-byte out-of-bounds read is reliably reproducible with no conditions outside attacker control. PR:L - Creating/changing the cake qdisc requires CAP_NET_ADMIN, but that capability is obtainable in an unprivileged user namespace via netlink_net_capable(sock_net()->user_ns), so only low privileges are required. UI:N - No victim interaction is needed; the attacker configures the qdisc and injects the crafted TCP packets themselves. S:U - Impact remains within the same kernel/host security authority; this is not a VM escape, IOMMU bypass, or other cross-boundary breakout. C:H - The bug is an out-of-bounds read of adjacent skb/stack memory past the TCP options; per scoring guidance OOB reads are treated as high confidentiality impact when they may expose adjacent kernel memory. I:N - The out-of-bounds access is a read only; the byte is used solely as opsize and then rejected by the existing bounds check, with no write primitive or controllable data modification. A:H - Reading one byte past valid packet/header data can fault when that address is unmapped or otherwise invalid, causing a kernel oops/panic and full availability loss.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 8b7138814f29933898ecd31dfc83e35a30ee69f5 to < 595897ef118d6fe66690c4fc5b572028c9da95b7 (affected · git)8b7138814f29933898ecd31dfc83e35a30ee69f5 to < 4cefa061fc63f4d2dff5ab4083f43857cd7a2335 (affected · git)8b7138814f29933898ecd31dfc83e35a30ee69f5 to < 3b491dd593d582ceeb27aa617600712a6bd14246 (affected · git)8b7138814f29933898ecd31dfc83e35a30ee69f5 to < 3371392c60e2685af30bd4547badd880f5df2b3f (affected · git)8b7138814f29933898ecd31dfc83e35a30ee69f5 to < ba91c49dedbde758ba0b72f57ac90b06ddf8e548 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 4.19 (affected)0 to < 4.19 (unaffected · semver)4.19.196 through 4.19.* (unaffected · semver)5.4.128 through 5.4.* (unaffected · semver)5.10.46 through 5.10.* (unaffected · semver)5.12.13 through 5.12.* (unaffected · semver)5.13 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
5- https://git.kernel.org/stable/c/3371392c60e2685af30bd4547badd880f5df2b3f
- https://git.kernel.org/stable/c/3b491dd593d582ceeb27aa617600712a6bd14246
- https://git.kernel.org/stable/c/4cefa061fc63f4d2dff5ab4083f43857cd7a2335
- https://git.kernel.org/stable/c/595897ef118d6fe66690c4fc5b572028c9da95b7
- https://git.kernel.org/stable/c/ba91c49dedbde758ba0b72f57ac90b06ddf8e548
Provider assertions
3Linux · cna
sch_cake: Fix out of bounds when parsing TCP options and header
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 4251809839b93a6f09951b2ecda1de3f39ec72eb2402f1978e97fb214cd9cc93
- Ingested
- 23 Sep 2026, 07:57:04 UTC
- Source record
- Official CVE record