Vulnerability · Published Nov 9, 2024 · Assigned by Linux

CVE-2024-50252mlxsw: spectrum_ipip: Fix memory leak when changing remote IPv6 address

Medium 5.5

In plain English

A medium-severity memory leak 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.2% (higher than 12% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.5Medium
Exploit odds (30 days)0.2%top 87.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: mlxsw: spectrum_ipip: Fix memory leak when changing remote IPv6 address The device stores IPv6 addresses that are used for encapsulation in linear memory that is managed by the driver. Changing the remote address of an ip6gre net device never worked properly, but since cited commit the following reproducer [1] would result in a warning [2] and a memory leak [3]. The problem is that the new remote address is never added by the driver to its hash table (and therefore the device) and the old address is never removed from it. Fix by programming the new address when the configuration of the ip6gre net device changes and removing the old one. If the address did not change, then the above would result in increasing the reference count of the address and then decreasing it. [1] # ip link add name bla up type ip6gre local 2001:db8:1::1 remote 2001:db8:2::1 tos inherit ttl inherit # ip link set dev bla type ip6gre remote 2001:db8:3::1 # ip link del dev bla # devlink dev reload pci/0000:01:00.0 [2] WARNING: CPU: 0 PID: 1682 at drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3002 mlxsw_sp_ipv6_addr_put+0x140/0x1d0 Modules linked in: CPU: 0 UID: 0 PID: 1682 Comm: ip Not tainted 6.12.0-rc3-custom-g86b5b55bc835 #151 Hardware name: Nvidia SN5600/VMOD0013, BIOS 5.13 05/31/2023 RIP: 0010:mlxsw_sp_ipv6_addr_put+0x140/0x1d0 [...] Call Trace: <TASK> mlxsw_sp_router_netdevice_event+0x55f/0x1240 notifier_call_chain+0x5a/0xd0 call_netdevice_notifiers_info+0x39/0x90 unregister_netdevice_many_notify+0x63e/0x9d0 rtnl_dellink+0x16b/0x3a0 rtnetlink_rcv_msg+0x142/0x3f0 netlink_rcv_skb+0x50/0x100 netlink_unicast+0x242/0x390 netlink_sendmsg+0x1de/0x420 ____sys_sendmsg+0x2bd/0x320 ___sys_sendmsg+0x9a/0xe0 __sys_sendmsg+0x7a/0xd0 do_syscall_64+0x9e/0x1a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f [3] unreferenced object 0xffff898081f597a0 (size 32): comm "ip", pid 1626, jiffies 4294719324 hex dump (first 32 bytes): 20 01 0d b8 00 02 00 00 00 00 00 00 00 00 00 01 ............... 21 49 61 83 80 89 ff ff 00 00 00 00 01 00 00 00 !Ia............. backtrace (crc fd9be911): [<00000000df89c55d>] __kmalloc_cache_noprof+0x1da/0x260 [<00000000ff2a1ddb>] mlxsw_sp_ipv6_addr_kvdl_index_get+0x281/0x340 [<000000009ddd445d>] mlxsw_sp_router_netdevice_event+0x47b/0x1240 [<00000000743e7757>] notifier_call_chain+0x5a/0xd0 [<000000007c7b9e13>] call_netdevice_notifiers_info+0x39/0x90 [<000000002509645d>] register_netdevice+0x5f7/0x7a0 [<00000000c2e7d2a9>] ip6gre_newlink_common.isra.0+0x65/0x130 [<0000000087cd6d8d>] ip6gre_newlink+0x72/0x120 [<000000004df7c7cc>] rtnl_newlink+0x471/0xa20 [<0000000057ed632a>] rtnetlink_rcv_msg+0x142/0x3f0 [<0000000032e0d5b5>] netlink_rcv_skb+0x50/0x100 [<00000000908bca63>] netlink_unicast+0x242/0x390 [<00000000cdbe1c87>] netlink_sendmsg+0x1de/0x420 [<0000000011db153e>] ____sys_sendmsg+0x2bd/0x320 [<000000003b6d53eb>] ___sys_sendmsg+0x9a/0xe0 [<00000000cae27c62>] __sys_sendmsg+0x7a/0xd0

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:9bpftool7.4.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-debug5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-debug-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-debug-devel5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-debug-devel-matched5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-debug-modules5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-debug-modules-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-debug-modules-extra5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-devel5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-devel-matched5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-modules5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-modules-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-64k-modules-extra5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-abi-stablelists5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-cross-headers5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-debug5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-debug-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-debug-devel5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-debug-devel-matched5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-debug-modules5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-debug-modules-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-debug-modules-extra5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-debug-uki-virt5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-devel5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-devel-matched5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-doc5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-headers5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-modules5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-modules-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-modules-extra5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-debug5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-debug-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-debug-devel5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-debug-modules5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-debug-modules-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-debug-modules-extra5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-devel5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-modules5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-modules-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-rt-modules-extra5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-tools5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-tools-libs5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-tools-libs-devel5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-uki-virt5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-uki-virt-addons5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-zfcpdump5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-zfcpdump-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-zfcpdump-devel5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-zfcpdump-devel-matched5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-zfcpdump-modules5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-zfcpdump-modules-core5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9kernel-zfcpdump-modules-extra5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9libperf5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9perf5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9python3-perf5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9rtla5.14.0-503.21.1.el9_5ALSA-2025:0059
AlmaLinux:9rv5.14.0-503.21.1.el9_5ALSA-2025:0059
Debian:12linux6.1.119-1DSA-5818-1
Debian:12linux6.1.119-1DEBIAN-CVE-2024-50252
Debian:13linux6.11.7-1DEBIAN-CVE-2024-50252
Debian:14linux6.11.7-1DEBIAN-CVE-2024-50252
Ubuntu:24.04:LTSlinux6.8.0-58.60UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-aws6.8.0-1027.29UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1027.29~22.04.1UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-azure6.8.0-1027.32UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-azure-6.116.11.0-1012.12~24.04.1UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1027.32~22.04.1UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-azure-nvidia6.8.0-1014.15UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-gcp6.8.0-1028.30UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-gcp-6.116.11.0-1011.11~24.04.1UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1028.30~22.04.1UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-gke6.8.0-1023.27UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1010.12UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-58.60~22.04.1UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-ibm6.8.0-1024.24UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1024.24~22.04.1UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-58.60.1UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-58.60.1~22.04.1UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1026.29UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-nvidia-6.116.11.0-1007.7UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1026.29~22.04.1UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1026.29.1UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-nvidia-tegra6.8.0-1008.8UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-oem-6.116.11.0-1015.15UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1026.26UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-oracle6.8.0-1024.25UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1024.25~22.04.1UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-raspi6.8.0-1028.32UBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-riscv6.8.0-58.60.1UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-58.60.1~22.04.1UBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-50252
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-50252
Ubuntu:24.04:LTSlinux-xilinx6.8.0-1017.18UBUNTU-CVE-2024-50252

Affected products (as reported)

VendorProductVersions
Linux Linux cf42911523e02026cb56d329e584ae5923e94ba1 – before d8f298eb6659eb6a38e26b79e77de4449dc6e61bcf42911523e02026cb56d329e584ae5923e94ba1 – before 31384aa2ad05c29c7745000f321154f42de24d1acf42911523e02026cb56d329e584ae5923e94ba1 – before c1bbdbe07f0bc3bc9f87efe4672d67208c6d6942cf42911523e02026cb56d329e584ae5923e94ba1 – before 12ae97c531fcd3bfd774d4dfeaeac23eafe24280
Linux Linux 5.17

Weakness: CWE-401 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

References