Lucene search

K
cve416baaa9-dc9f-4396-8d5f-8c081fb06d67CVE-2021-47243
HistoryMay 21, 2024 - 3:15 p.m.

CVE-2021-47243

2024-05-2115:15:13
416baaa9-dc9f-4396-8d5f-8c081fb06d67
web.nvd.nist.gov
30
linux kernel
vulnerability
sch_cake
tcp options
parsing
out of bounds
fix
nvd

6.7 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.5%

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.

Affected configurations

Vulners
Node
linuxlinux_kernelRange4.194.19.196
OR
linuxlinux_kernelRange4.20.05.4.128
OR
linuxlinux_kernelRange5.5.05.10.46
OR
linuxlinux_kernelRange5.11.05.12.13
OR
linuxlinux_kernelRange5.13.0

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/sched/sch_cake.c"
    ],
    "versions": [
      {
        "version": "8b7138814f29",
        "lessThan": "595897ef118d",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "8b7138814f29",
        "lessThan": "4cefa061fc63",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "8b7138814f29",
        "lessThan": "3b491dd593d5",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "8b7138814f29",
        "lessThan": "3371392c60e2",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "8b7138814f29",
        "lessThan": "ba91c49dedbd",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "net/sched/sch_cake.c"
    ],
    "versions": [
      {
        "version": "4.19",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "4.19",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "4.19.196",
        "lessThanOrEqual": "4.19.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.4.128",
        "lessThanOrEqual": "5.4.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.10.46",
        "lessThanOrEqual": "5.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.12.13",
        "lessThanOrEqual": "5.12.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.13",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

6.7 Medium

AI Score

Confidence

Low

0.0004 Low

EPSS

Percentile

15.5%