CVE-2021-47159

net: dsa: fix a crash if ->get_sset_count() fails

MEDIUM
5.5
CVSS Score
Published: March 25, 2024 at 09:16 AM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: net: dsa: fix a crash if ->get_sset_count() fails If ds->ops->get_sset_count() fails then it "count" is a negative error code such as -EOPNOTSUPP. Because "i" is an unsigned int, the negative error code is type promoted to a very high value and the loop will corrupt memory until the system crashes. Fix this by checking for error codes and changing the type of "i" to just int.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.20 ≤ v < 5.4.1244.7 ≤ v < 4.19.1934.7 ≤ v < 5.10.424.7 ≤ v < 5.12.94.7 ≤ v < 5.134.7 ≤ v < 5.4.1245.11 ≤ v < 5.12.95.5 ≤ v < 5.10.425.13 rc15.13 rc25.13 rc3badf3ada60ab8f76f9488dc8f5c0c57f70682f5a
Vendor states this is fixed in 0f2cb08c57edefb0e7b5045e0e3e9980a3d3aa37 (fixed)
Vendor states this is fixed in 7b22466648a4f8e3e94f57ca428d1531866d1373 (fixed)
Vendor states this is fixed in a269333fa5c0c8e53c92b5a28a6076a28cde3e83 (fixed)
Vendor states this is fixed in caff86f85512b8e0d9830e8b8b0dfe13c68ce5b6 (fixed)
Vendor states this is fixed in ce5355f140a7987011388c7e30c4f8fbe180d3e8 (fixed)
Vendor states this is fixed in 4.19.193 (unaffected)
Vendor states this is fixed in 4.7 (unaffected)
Vendor states this is fixed in 5.10.42 (unaffected)
Vendor states this is fixed in 5.12.9 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)
Vendor states this is fixed in 5.4.124 (unaffected)

References (5)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0f2cb08c57edefb0e7b5045e0e3e9980a3d3aa37
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7b22466648a4f8e3e94f57ca428d1531866d1373
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a269333fa5c0c8e53c92b5a28a6076a28cde3e83
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/caff86f85512b8e0d9830e8b8b0dfe13c68ce5b6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ce5355f140a7987011388c7e30c4f8fbe180d3e8

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-835

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card