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

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/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.22%, higher than 13% of CVEs (2026-12-01)
- Published: 2025-02-26T02:23:19.626Z
- Modified: 2026-06-17T05:18:31.700Z
- Weaknesses: CWE-476
- 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: 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.

(As written by CVE List.)

## Affected

- Linux Linux: from d0004a020bb50263de0e3e775c7b7c7a003e0e0c before 3240e12fe203a3a79b9814e83327106b770ed7b0; from d0004a020bb50263de0e3e775c7b7c7a003e0e0c before 1699b4d502eda3c7ea4070debad3ee570b5091b1; 5.16 (not affected: before 5.16; from 5.18.15 up to 5.18.*; from 5.19 up to *)
- linux linux_kernel: from 5.16 before 5.18.15; 5.19

## Every score

- CISA-ADP: 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`
- 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/3240e12fe203a3a79b9814e83327106b770ed7b0> (patch)
- <https://git.kernel.org/stable/c/1699b4d502eda3c7ea4070debad3ee570b5091b1> (patch)

## Sources

- CVE List: [CVE-2022-49582](https://www.cve.org/CVERecord?id=CVE-2022-49582), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-49582](https://nvd.nist.gov/vuln/detail/CVE-2022-49582), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-49582 · Whole record: https://cve.day/CVE-2022-49582.json · Rebuilt by cve.day 2026-11-25T22:58:20.743Z
