# CVE-2022-48980: net: dsa: sja1105: avoid out of bounds access in sja1105\_init\_l2\_policing()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2024-10-21T20:05:58.373Z
- **Modified:** 2026-06-17T05:16:46.077Z

## Who should check

- Anyone running Linux \>= 38fbe91f2287c696f290d9115901aa435f7166a8, \< 5e88c6f4aaa70c542e59e5a9d2244bcc99cd245d; \>= 38fbe91f2287c696f290d9115901aa435f7166a8, \< 147f3e3d84054117ae6b9bf317ec4fda9f991192; \>= 38fbe91f2287c696f290d9115901aa435f7166a8, \< f8bac7f9fdb0017b32157957ffffd490f95faa07
- Anyone running Linux 5.14

## Description

In the Linux kernel, the following vulnerability has been resolved:

net: dsa: sja1105: avoid out of bounds access in sja1105\_init\_l2\_policing()

The SJA1105 family has 45 L2 policing table entries
(SJA1105\_MAX\_L2\_POLICING\_COUNT) and SJA1110 has 110
(SJA1110\_MAX\_L2\_POLICING\_COUNT). Keeping the table structure but
accounting for the difference in port count (5 in SJA1105 vs 10 in
SJA1110) does not fully explain the difference. Rather, the SJA1110 also
has L2 ingress policers for multicast traffic. If a packet is classified
as multicast, it will be processed by the policer index 99 + SRCPORT.

The sja1105\_init\_l2\_policing() function initializes all L2 policers such
that they don't interfere with normal packet reception by default. To have
a common code between SJA1105 and SJA1110, the index of the multicast
policer for the port is calculated because it's an index that is out of
bounds for SJA1105 but in bounds for SJA1110, and a bounds check is
performed.

The code fails to do the proper thing when determining what to do with the
multicast policer of port 0 on SJA1105 (ds-\>num\_ports = 5). The "mcast"
index will be equal to 45, which is also equal to
table-\>ops-\>max\_entry\_count (SJA1105\_MAX\_L2\_POLICING\_COUNT). So it passes
through the check. But at the same time, SJA1105 doesn't have multicast
policers. So the code programs the SHARINDX field of an out-of-bounds
element in the L2 Policing table of the static config.

The comparison between index 45 and 45 entries should have determined the
code to not access this policer index on SJA1105, since its memory wasn't
even allocated.

With enough bad luck, the out-of-bounds write could even overwrite other
valid kernel data, but in this case, the issue was detected using KASAN.

Kernel log:

sja1105 spi5.0: Probed switch chip: SJA1105Q
==================================================================
BUG: KASAN: slab-out-of-bounds in sja1105\_setup+0x1cbc/0x2340
Write of size 8 at addr ffffff880bd57708 by task kworker/u8:0/8
...
Workqueue: events\_unbound deferred\_probe\_work\_func
Call trace:
...
sja1105\_setup+0x1cbc/0x2340
dsa\_register\_switch+0x1284/0x18d0
sja1105\_probe+0x748/0x840
...
Allocated by task 8:
...
sja1105\_setup+0x1bcc/0x2340
dsa\_register\_switch+0x1284/0x18d0
sja1105\_probe+0x748/0x840
...

## Affected and fixed versions

- Linux: \>= 38fbe91f2287c696f290d9115901aa435f7166a8, \< 5e88c6f4aaa70c542e59e5a9d2244bcc99cd245d; \>= 38fbe91f2287c696f290d9115901aa435f7166a8, \< 147f3e3d84054117ae6b9bf317ec4fda9f991192; \>= 38fbe91f2287c696f290d9115901aa435f7166a8, \< f8bac7f9fdb0017b32157957ffffd490f95faa07 (cvelist)
- Linux: 5.14 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-48980. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-48980.md
Affected: Linux >= 38fbe91f2287c696f290d9115901aa435f7166a8, < 5e88c6f4aaa70c542e59e5a9d2244bcc99cd245d; >= 38fbe91f2287c696f290d9115901aa435f7166a8, < 147f3e3d84054117ae6b9bf317ec4fda9f991192; >= 38fbe91f2287c696f290d9115901aa435f7166a8, < f8bac7f9fdb0017b32157957ffffd490f95faa07; Linux 5.14
Fixed in: Linux 5e88c6f4aaa70c542e59e5a9d2244bcc99cd245d, Linux 147f3e3d84054117ae6b9bf317ec4fda9f991192

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-48980 being exploited?

There is no confirmed exploitation: CVE-2022-48980 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-48980?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-48980?

Linux \>= 38fbe91f2287c696f290d9115901aa435f7166a8, \< 5e88c6f4aaa70c542e59e5a9d2244bcc99cd245d; \>= 38fbe91f2287c696f290d9115901aa435f7166a8, \< 147f3e3d84054117ae6b9bf317ec4fda9f991192; \>= 38fbe91f2287c696f290d9115901aa435f7166a8, \< f8bac7f9fdb0017b32157957ffffd490f95faa07; Linux 5.14.

### Is there a fix for CVE-2022-48980?

Yes. Fixed in Linux 5e88c6f4aaa70c542e59e5a9d2244bcc99cd245d, Linux 147f3e3d84054117ae6b9bf317ec4fda9f991192. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-48980?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/5e88c6f4aaa70c542e59e5a9d2244bcc99cd245d>
- patch: <https://git.kernel.org/stable/c/147f3e3d84054117ae6b9bf317ec4fda9f991192>
- patch: <https://git.kernel.org/stable/c/f8bac7f9fdb0017b32157957ffffd490f95faa07>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-48980>

HTML: <https://flawdb.com/CVE-2022-48980> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-48980>
