CVE-2022-48779
published high CVSS 3.1 · 7.8net: mscc: ocelot: fix use-after-free in ocelot_vlan_del()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxd4004422f6f9fa8e55c04482008c1c9f9edd2d19 to < c98bed60cdd7f22237ae256cc9c1c3087206b8a2 · d4004422f6f9fa8e55c04482008c1c9f9edd2d19 to < ef57640575406f57f5b3393cf57f457b0ace837e · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.16 (affected) · 0 to < 5.16 (unaffected · semver) · 5.16.11 through 5.16.* (unaffected · semver) · 5.17 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: mscc: ocelot: fix use-after-free in ocelot_vlan_del() ocelot_vlan_member_del() will free the struct ocelot_bridge_vlan, so if this is the same as the port's pvid_vlan which we access afterwards, what we're accessing is freed memory. Fix the bug by determining whether to clear ocelot_port->pvid_vlan prior to calling ocelot_vlan_member_del().
Related advisories
Vendor advisories explicitly linked to this CVE.
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 UAF is reached only through local VLAN configuration (bridge switchdev PORT_VLAN delete or ndo_vlan_rx_kill_vid → ocelot_vlan_del/felix_vlan_del), not by processing remote or adjacent-link packets. AC:L - An attacker who can add then delete a PVID VLAN as the last member deterministically frees struct ocelot_bridge_vlan and then dereferences ocelot_port->pvid_vlan; no attacker-uncontrollable race or external condition is required. PR:L - VLAN delete is gated by CAP_NET_ADMIN via netlink_ns_capable in the device’s user_ns; Felix/ocelot ports are not NETIF_F_NETNS_LOCAL, so a delegated port in a user-namespace-owned netns yields NET_ADMIN without init-namespace root (same model as CVE-2022-49141/CVE-2026-22982). UI:N - The attacker performs the bridge/8021q VLAN delete themselves; no separate victim action is required. S:U - This is a standard in-kernel heap use-after-free within the host OS authority and does not cross a VM, IOMMU, or other security boundary. C:H - ocelot_vlan_member_del() frees the ocelot_bridge_vlan while pvid_vlan still points at it, so the subsequent vid read (and later ocelot_port_set_pvid uses of a dangling pointer) is a classic UAF enabling arbitrary kernel read via heap reuse. I:H - The dangling pvid_vlan pointer can persist when freed memory is reused with a non-matching vid, and later reads of attacker-controlled object contents influence kernel/hardware VLAN state, yielding standard UAF write/control-flow primitives under heap spraying. A:H - Use-after-free of the VLAN object can oops/panic the kernel even without a full exploit, so availability impact is High per UAF guidance.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | d4004422f6f9fa8e55c04482008c1c9f9edd2d19 to < c98bed60cdd7f22237ae256cc9c1c3087206b8a2 (affected · git)d4004422f6f9fa8e55c04482008c1c9f9edd2d19 to < ef57640575406f57f5b3393cf57f457b0ace837e (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 5.16 (affected)0 to < 5.16 (unaffected · semver)5.16.11 through 5.16.* (unaffected · semver)5.17 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
3Linux · cna
net: mscc: ocelot: fix use-after-free in ocelot_vlan_del()
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 5fc95511e1841f692bf3a3824cf9b5bb0c4f69b509063a656ce8322207f1c58d
- Ingested
- 23 Sep 2026, 08:04:03 UTC
- Source record
- Official CVE record