CVE-2022-49582 net: dsa: fix NULL pointer dereference in dsa_port_reset_vlan_filtering

Medium 5.5 Published Updated

A NULL pointer dereference in the Linux kernel DSA subsystem allows local attackers to cause a denial of service by triggering specific VLAN filtering code paths.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-49582?

CVE-2022-49582 is a medium-severity vulnerability in Linux kernel, published on 26 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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

net: dsa: fix NULL pointer dereference in dsa_port_reset_vlan_filtering

The "ds" iterator variable used in dsa_port_reset_vlan_filtering() -> dsa_switch_for_each_port() overwrites the "dp" received as argument, which is later used to call dsa_port_vlan_filtering() proper.

As a result, switches which do enter that code path (the ones with vlan_filtering_is_global=true) will dereference an invalid dp in dsa_port_reset_vlan_filtering() after leaving a VLAN-aware bridge.

Use a dedicated "other_dp" iterator variable to avoid this from happening.

Weakness: CWE-476

Which versions are affected by CVE-2022-49582?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-49582?

Apply the vendor's patch.

Is CVE-2022-49582 being exploited?

There is no known exploitation of CVE-2022-49582 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-49582, GHSA-5hxf-f4vp-6c88, UBUNTU-CVE-2022-49582.

Is CVE-2022-49582 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free