# CVE-2022-50837: net: dsa: tag_8021q: avoid leaking ctx on dsa_tag_8021q_register() error path

- Severity: not scored yet
- 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.26%, higher than 18% of CVEs (2026-12-02)
- Published: 2025-12-30T12:10:57.049Z
- Modified: 2026-06-17T05:24:16.323Z
- Assigned by: Linux

## Description

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

net: dsa: tag_8021q: avoid leaking ctx on dsa_tag_8021q_register() error path

If dsa_tag_8021q_setup() fails, for example due to the inability of the
device to install a VLAN, the tag_8021q context of the switch will leak.
Make sure it is freed on the error path.

(As written by CVE List.)

## Affected

- Linux Linux: from 328621f6131f667c5c328bb72d45442fd76efb81 before 09f30f394e832ed09859b6a80fdd20668a9104ff; from 328621f6131f667c5c328bb72d45442fd76efb81 before 39691d51af99f80efb9e365f94b8e0c791fa1a2f; from 328621f6131f667c5c328bb72d45442fd76efb81 before 14ed46a13aba42a6ddd85de6f6274090df3586a5; from 328621f6131f667c5c328bb72d45442fd76efb81 before e095493091e850d5292ad01d8fbf5cde1d89ac53; 5.15 (not affected: before 5.15; from 5.15.86 up to 5.15.*; from 6.0.16 up to 6.0.*; from 6.1.2 up to 6.1.*; from 6.2 up to *)

## References

- <https://git.kernel.org/stable/c/09f30f394e832ed09859b6a80fdd20668a9104ff>
- <https://git.kernel.org/stable/c/39691d51af99f80efb9e365f94b8e0c791fa1a2f>
- <https://git.kernel.org/stable/c/14ed46a13aba42a6ddd85de6f6274090df3586a5>
- <https://git.kernel.org/stable/c/e095493091e850d5292ad01d8fbf5cde1d89ac53>

## Sources

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

---

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