Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2021-47158

published high CVSS 3.1 · 7.8

net: dsa: sja1105: add error handling in sja1105_setup()

Published
25 Mar 2024, 09:16:13 UTC
Updated
05 Aug 2026, 08:46:22 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux8aa9ebccae87621d997707e4f25e53fddd7e30e4 to < dd8609f203448ca6d58ae71461208b3f6b0329b0 · 8aa9ebccae87621d997707e4f25e53fddd7e30e4 to < 987e4ab8b8a4fcbf783069e03e7524cd39ffd563 · 8aa9ebccae87621d997707e4f25e53fddd7e30e4 to < cec279a898a3b004411682f212215ccaea1cd0fb · Other versions: unaffected Affected Not stated Linux
Linux — Linux5.2 (affected) · 0 to < 5.2 (unaffected · semver) · 5.10.42 through 5.10.* (unaffected · semver) · 5.12.9 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: net: dsa: sja1105: add error handling in sja1105_setup() If any of sja1105_static_config_load(), sja1105_clocking_setup() or sja1105_devlink_setup() fails, we can't just return in the middle of sja1105_setup() or memory will leak. Add a cleanup path.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

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.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The bug is in the SJA1105 SPI DSA driver probe path (sja1105_probe → dsa_register_switch → sja1105_setup), not in packet processing; exploitation is local via driver (re)bind failure and subsequent access to the leftover /dev/ptpN device. AC:L - The error path is deterministic once static_config_load/clocking_setup/devlink_setup fails after PTP registration (e.g., -ENOMEM or SPI failure), and the resulting dangling PTP clock can be exercised reliably through standard PTP ioctls with no race beyond attacker influence. PR:L - On automotive/industrial SJA1105 systems, a mid-setup failure leaves a registered PTP clock after demv frees priv; an unprivileged local user who can open /dev/ptpN (ptp_open has no capability check) can then trigger the UAF without needing CAP_SYS_ADMIN. UI:N - No victim action is required; the attacker drives probe-failure conditions and/or opens the dangling PTP device and issues ioctls themselves. S:U - Impact is confined to kernel memory corruption within the same host kernel authority; this is not a VM escape, IOMMU bypass, or other cross-boundary break. C:H - After demv releases priv while ptp->info still points into it, PTP ioctls (e.g. GETCAPS/gettime) dereference freed ptp_clock_info, yielding a UAF that can be reclaimed and read for arbitrary kernel memory disclosure. I:H - The dangling ptp_clock_info holds function pointers (adjfine/gettimex64/settime64/etc.) in freed heap; heap reuse enables control-flow hijacking through those callbacks, so integrity impact is High. A:H - Use-after-free on the freed priv/ptp_data (and related timer/worker state) causes kernel oops/crash even without full exploitation, so availability impact is High.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 8aa9ebccae87621d997707e4f25e53fddd7e30e4 to < dd8609f203448ca6d58ae71461208b3f6b0329b0 (affected · git)8aa9ebccae87621d997707e4f25e53fddd7e30e4 to < 987e4ab8b8a4fcbf783069e03e7524cd39ffd563 (affected · git)8aa9ebccae87621d997707e4f25e53fddd7e30e4 to < cec279a898a3b004411682f212215ccaea1cd0fb (affected · git)Default: unaffected Linux · cna
Linux Linux 5.2 (affected)0 to < 5.2 (unaffected · semver)5.10.42 through 5.10.* (unaffected · semver)5.12.9 through 5.12.* (unaffected · semver)5.13 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

3

Provider assertions

3

Linux · cna

net: dsa: sja1105: add error handling in sja1105_setup()

CISA-ADP · adp

CISA ADP Vulnrichment

CVE · adp

CVE Program Container

Provenance

Schema
5.2
Searchable
yes
Content hash
61c74468bcf7ea006956e1211ea93463dd0b13f6d185a8c4eaed9f003c383b72
Ingested
23 Sep 2026, 07:57:04 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected