# CVE-2021-47158: net: dsa: sja1105: add error handling in sja1105_setup()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 15% of CVEs (2026-12-01)
- Published: 2024-03-25T09:16:13.087Z
- Modified: 2026-08-05T08:46:22.882Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 8aa9ebccae87621d997707e4f25e53fddd7e30e4 before dd8609f203448ca6d58ae71461208b3f6b0329b0; from 8aa9ebccae87621d997707e4f25e53fddd7e30e4 before 987e4ab8b8a4fcbf783069e03e7524cd39ffd563; from 8aa9ebccae87621d997707e4f25e53fddd7e30e4 before cec279a898a3b004411682f212215ccaea1cd0fb; 5.2 (not affected: before 5.2; from 5.10.42 up to 5.10.*; from 5.12.9 up to 5.12.*; from 5.13 up to *)
- linux linux_kernel: from 5.2 before 5.10.42; from 5.11 before 5.12.9; 5.13

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/dd8609f203448ca6d58ae71461208b3f6b0329b0> (patch)
- <https://git.kernel.org/stable/c/987e4ab8b8a4fcbf783069e03e7524cd39ffd563> (patch)
- <https://git.kernel.org/stable/c/cec279a898a3b004411682f212215ccaea1cd0fb> (patch)

## Sources

- CVE List: [CVE-2021-47158](https://www.cve.org/CVERecord?id=CVE-2021-47158), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2021-47158](https://nvd.nist.gov/vuln/detail/CVE-2021-47158), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2021-47158 · Whole record: https://cve.day/CVE-2021-47158.json · Rebuilt by cve.day 2026-11-25T22:58:08.691Z
