Vulnerability · Published Feb 26, 2025 · Assigned by Linux
CVE-2022-49636vlan: fix memory leak in vlan_newlink()
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 23% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 5.18.14-1 | DEBIAN-CVE-2022-49636 |
| Debian:13 | linux | 5.18.14-1 | DEBIAN-CVE-2022-49636 |
| Debian:14 | linux | 5.18.14-1 | DEBIAN-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux | 5.15.0-142.152 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux | 5.15.0-142.152 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1086.93 | USN-7591-4 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1086.93 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1091.100 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1091.100 | USN-7597-1 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1091.100.1 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1085.94 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1085.94 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1083.89 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1083.89 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1068.76 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1068.76 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1078.81 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1078.81 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1081.87 | USN-7591-5 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1081.87 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1082.87 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1082.87 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-142.152 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-142.152 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1080.81 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1080.81 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1039.39 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1039.39 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1028.28 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1028.28 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1083.89 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1083.89 | USN-7591-1 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1080.83 | USN-7591-6 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1080.83 | UBUNTU-CVE-2022-49636 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1050.54 | UBUNTU-CVE-2022-49636 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1050.54 | USN-7602-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | b195d229de401377f70c04e0dff93b342464ec8e – before 549de58dba4bf1b2adc72e9948b9c76fa88be9d262d7ad2c191122119c66361ba6d9f04974b51afe – before df27729a4fe0002dfd80c96fe1c142829c672728842801181864690fdcde73b017cce4c1353a7083 – before f5dc10b910bdac523e5947336445a77066c51bf937aa50c539bcbcc01767e515bd170787fcfc0f33 – before 4c43069bb1097dd6cc1cf0f7c43a36d1f7b3910b37aa50c539bcbcc01767e515bd170787fcfc0f33 – before 72a0b329114b1caa8e69dfa7cdad1dd3c69b86025.4.291 – before 5.4.2925.10.235 – before 5.10.2365.15.142 – before 5.15.180 |
| Linux | Linux | 5.17 |
References
- https://git.kernel.org/stable/c/549de58dba4bf1b2adc72e9948b9c76fa88be9d2
- https://git.kernel.org/stable/c/df27729a4fe0002dfd80c96fe1c142829c672728
- https://git.kernel.org/stable/c/f5dc10b910bdac523e5947336445a77066c51bf9
- https://git.kernel.org/stable/c/4c43069bb1097dd6cc1cf0f7c43a36d1f7b3910b
- https://git.kernel.org/stable/c/72a0b329114b1caa8e69dfa7cdad1dd3c69b8602