# CVE-2022-49636: vlan: fix memory leak in vlan\_newlink()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 14, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-02-26T02:23:46.222Z
- **Modified:** 2026-06-17T05:18:42.173Z

## Who should check

- Anyone running Linux \>= b195d229de401377f70c04e0dff93b342464ec8e, \< 549de58dba4bf1b2adc72e9948b9c76fa88be9d2; \>= 62d7ad2c191122119c66361ba6d9f04974b51afe, \< df27729a4fe0002dfd80c96fe1c142829c672728; \>= 842801181864690fdcde73b017cce4c1353a7083, \< f5dc10b910bdac523e5947336445a77066c51bf9; \>= 37aa50c539bcbcc01767e515bd170787fcfc0f33, \< 4c43069bb1097dd6cc1cf0f7c43a36d1f7b3910b; \>= 37aa50c539bcbcc01767e515bd170787fcfc0f33, \< 72a0b329114b1caa8e69dfa7cdad1dd3c69b8602; \>= 5.4.291, \< 5.4.292; \>= 5.10.235, \< 5.10.236; \>= 5.15.142, \< 5.15.180
- Anyone running Linux 5.17

## Description

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

vlan: fix memory leak in vlan\_newlink()

Blamed commit added back a bug I fixed in commit 9bbd917e0bec
("vlan: fix memory leak in vlan\_dev\_set\_egress\_priority")

If a memory allocation fails in vlan\_changelink() after other allocations
succeeded, we need to call vlan\_dev\_free\_egress\_priority()
to free all allocated memory because after a failed -\>newlink()
we do not call any methods like ndo\_uninit() or dev-\>priv\_destructor().

In following example, if the allocation for last element 2000:2001 fails,
we need to free eight prior allocations:

ip link add link dummy0 dummy0.100 type vlan id 100 \\
	egress-qos-map 1:2 2:3 3:4 4:5 5:6 6:7 7:8 8:9 2000:2001

syzbot report was:

BUG: memory leak
unreferenced object 0xffff888117bd1060 (size 32):
comm "syz-executor408", pid 3759, jiffies 4294956555 (age 34.090s)
hex dump (first 32 bytes):
09 00 00 00 00 a0 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
\[\<ffffffff83fc60ad\>\] kmalloc include/linux/slab.h:600 \[inline\]
\[\<ffffffff83fc60ad\>\] vlan\_dev\_set\_egress\_priority+0xed/0x170 net/8021q/vlan\_dev.c:193
\[\<ffffffff83fc6628\>\] vlan\_changelink+0x178/0x1d0 net/8021q/vlan\_netlink.c:128
\[\<ffffffff83fc67c8\>\] vlan\_newlink+0x148/0x260 net/8021q/vlan\_netlink.c:185
\[\<ffffffff838b1278\>\] rtnl\_newlink\_create net/core/rtnetlink.c:3363 \[inline\]
\[\<ffffffff838b1278\>\] \_\_rtnl\_newlink+0xa58/0xdc0 net/core/rtnetlink.c:3580
\[\<ffffffff838b1629\>\] rtnl\_newlink+0x49/0x70 net/core/rtnetlink.c:3593
\[\<ffffffff838ac66c\>\] rtnetlink\_rcv\_msg+0x21c/0x5c0 net/core/rtnetlink.c:6089
\[\<ffffffff839f9c37\>\] netlink\_rcv\_skb+0x87/0x1d0 net/netlink/af\_netlink.c:2501
\[\<ffffffff839f8da7\>\] netlink\_unicast\_kernel net/netlink/af\_netlink.c:1319 \[inline\]
\[\<ffffffff839f8da7\>\] netlink\_unicast+0x397/0x4c0 net/netlink/af\_netlink.c:1345
\[\<ffffffff839f9266\>\] netlink\_sendmsg+0x396/0x710 net/netlink/af\_netlink.c:1921
\[\<ffffffff8384dbf6\>\] sock\_sendmsg\_nosec net/socket.c:714 \[inline\]
\[\<ffffffff8384dbf6\>\] sock\_sendmsg+0x56/0x80 net/socket.c:734
\[\<ffffffff8384e15c\>\] \_\_\_\_sys\_sendmsg+0x36c/0x390 net/socket.c:2488
\[\<ffffffff838523cb\>\] \_\_\_sys\_sendmsg+0x8b/0xd0 net/socket.c:2542
\[\<ffffffff838525b8\>\] \_\_sys\_sendmsg net/socket.c:2571 \[inline\]
\[\<ffffffff838525b8\>\] \_\_do\_sys\_sendmsg net/socket.c:2580 \[inline\]
\[\<ffffffff838525b8\>\] \_\_se\_sys\_sendmsg net/socket.c:2578 \[inline\]
\[\<ffffffff838525b8\>\] \_\_x64\_sys\_sendmsg+0x78/0xf0 net/socket.c:2578
\[\<ffffffff845ad8d5\>\] do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
\[\<ffffffff845ad8d5\>\] do\_syscall\_64+0x35/0xb0 arch/x86/entry/common.c:80
\[\<ffffffff8460006a\>\] entry\_SYSCALL\_64\_after\_hwframe+0x46/0xb0

## Affected and fixed versions

- Linux: \>= b195d229de401377f70c04e0dff93b342464ec8e, \< 549de58dba4bf1b2adc72e9948b9c76fa88be9d2; \>= 62d7ad2c191122119c66361ba6d9f04974b51afe, \< df27729a4fe0002dfd80c96fe1c142829c672728; \>= 842801181864690fdcde73b017cce4c1353a7083, \< f5dc10b910bdac523e5947336445a77066c51bf9; \>= 37aa50c539bcbcc01767e515bd170787fcfc0f33, \< 4c43069bb1097dd6cc1cf0f7c43a36d1f7b3910b; \>= 37aa50c539bcbcc01767e515bd170787fcfc0f33, \< 72a0b329114b1caa8e69dfa7cdad1dd3c69b8602; \>= 5.4.291, \< 5.4.292; \>= 5.10.235, \< 5.10.236; \>= 5.15.142, \< 5.15.180 (cvelist)
- Linux: 5.17 (cvelist)

## Mitigation

- Upgrade Linux to 5.15.180 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49636. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49636.md
Affected: Linux >= b195d229de401377f70c04e0dff93b342464ec8e, < 549de58dba4bf1b2adc72e9948b9c76fa88be9d2; >= 62d7ad2c191122119c66361ba6d9f04974b51afe, < df27729a4fe0002dfd80c96fe1c142829c672728; >= 842801181864690fdcde73b017cce4c1353a7083, < f5dc10b910bdac523e5947336445a77066c51bf9; >= 37aa50c539bcbcc01767e51…
Fixed in: Linux 549de58dba4bf1b2adc72e9948b9c76fa88be9d2, Linux 4c43069bb1097dd6cc1cf0f7c43a36d1f7b3910b, Linux 72a0b329114b1caa8e69dfa7cdad1dd3c69b8602, Linux 5.4.292, Linux 5.10.236, Linux 5.15.180

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49636 being exploited?

There is no confirmed exploitation: CVE-2022-49636 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49636?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49636?

Linux \>= b195d229de401377f70c04e0dff93b342464ec8e, \< 549de58dba4bf1b2adc72e9948b9c76fa88be9d2; \>= 62d7ad2c191122119c66361ba6d9f04974b51afe, \< df27729a4fe0002dfd80c96fe1c142829c672728; \>= 842801181864690fdcde73b017cce4c1353a7083, \< f5dc10b910bdac523e5947336445a77066c51bf9; \>= 37aa50c539bcbcc01767e515bd170787fcfc0f33, \< 4c43069bb1097dd6cc1cf0f7c43a36d1f7b3910b; \>= 37aa50c539bcbcc01767e515bd170787fcfc0f33, \< 72a0b329114b1caa8e69dfa7cdad1dd3c69b8602; \>= 5.4.291, \< 5.4.292; \>= 5.10.235, \< 5.10.236; \>= 5.15.142, \< 5.15.180; Linux 5.17.

### Is there a fix for CVE-2022-49636?

Yes. Fixed in Linux 549de58dba4bf1b2adc72e9948b9c76fa88be9d2, Linux 4c43069bb1097dd6cc1cf0f7c43a36d1f7b3910b, Linux 72a0b329114b1caa8e69dfa7cdad1dd3c69b8602, Linux 5.4.292, Linux 5.10.236, Linux 5.15.180. Upgrade Linux to 5.15.180 or later.

### How do I check if I'm affected by CVE-2022-49636?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/4c43069bb1097dd6cc1cf0f7c43a36d1f7b3910b>
- patch: <https://git.kernel.org/stable/c/72a0b329114b1caa8e69dfa7cdad1dd3c69b8602>
- other: <https://git.kernel.org/stable/c/549de58dba4bf1b2adc72e9948b9c76fa88be9d2>
- other: <https://git.kernel.org/stable/c/df27729a4fe0002dfd80c96fe1c142829c672728>
- other: <https://git.kernel.org/stable/c/f5dc10b910bdac523e5947336445a77066c51bf9>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49636>

HTML: <https://flawdb.com/CVE-2022-49636> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49636>
