CVE-2022-49582
JSON

5.5medium

net: dsa: fix NULL pointer dereference in dsa_port_reset_vlan_filtering

Severity
5.5medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
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.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 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 *
CVE List
linux linux_kernelfrom 5.16 before 5.18.15, 5.19NVD

All scores

CISA-ADP5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-476

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net: dsa: fix NULL pointer dereference in dsa_port_reset_vlan_filtering La variable de iterador "ds" utilizada en dsa_port_reset_vlan_filtering() -> dsa_switch_for_each_port() sobrescribe el "dp" recibido como argumento, que luego se utiliza para llamar a dsa_port_vlan_filtering() correctamente. Como resultado, los conmutadores que ingresan a esa ruta de código (los que tienen vlan_filtering_is_global=true) desreferenciarán un dp no válido en dsa_port_reset_vlan_filtering() después de abandonar un puente con reconocimiento de VLAN. Utilice una variable de iterador "other_dp" dedicada para evitar que esto suceda.

References

Sources

SourceRecordLicence
CVE ListCVE-2022-49582 changed 2026-05-11CVE Terms of Use
NVDCVE-2022-49582 changed 2026-06-17Public domain