# CVE-2024-50252: mlxsw: spectrum\_ipip: Fix memory leak when changing remote IPv6 address

> 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, CNA) `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.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2024-11-09T10:15:00.949Z
- **Modified:** 2026-06-17T08:04:00.910Z

## Who should check

- Anyone running Linux \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< d8f298eb6659eb6a38e26b79e77de4449dc6e61b; \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< 31384aa2ad05c29c7745000f321154f42de24d1a; \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< c1bbdbe07f0bc3bc9f87efe4672d67208c6d6942; \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< 12ae97c531fcd3bfd774d4dfeaeac23eafe24280
- Anyone running Linux 5.17

## 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 and fixed versions

- Linux: \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< d8f298eb6659eb6a38e26b79e77de4449dc6e61b; \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< 31384aa2ad05c29c7745000f321154f42de24d1a; \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< c1bbdbe07f0bc3bc9f87efe4672d67208c6d6942; \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< 12ae97c531fcd3bfd774d4dfeaeac23eafe24280 (cvelist)
- Linux: 5.17 (cvelist)

## Mitigation

- Upgrade Linux to 12ae97c531fcd3bfd774d4dfeaeac23eafe24280 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-50252.md
Affected: Linux >= cf42911523e02026cb56d329e584ae5923e94ba1, < d8f298eb6659eb6a38e26b79e77de4449dc6e61b; >= cf42911523e02026cb56d329e584ae5923e94ba1, < 31384aa2ad05c29c7745000f321154f42de24d1a; >= cf42911523e02026cb56d329e584ae5923e94ba1, < c1bbdbe07f0bc3bc9f87efe4672d67208c6d6942; >= cf42911523e02026cb56d32…
Fixed in: Linux 31384aa2ad05c29c7745000f321154f42de24d1a, Linux 12ae97c531fcd3bfd774d4dfeaeac23eafe24280

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-2024-50252 being exploited?

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

### How serious is CVE-2024-50252?

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

### Which versions are affected by CVE-2024-50252?

Linux \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< d8f298eb6659eb6a38e26b79e77de4449dc6e61b; \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< 31384aa2ad05c29c7745000f321154f42de24d1a; \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< c1bbdbe07f0bc3bc9f87efe4672d67208c6d6942; \>= cf42911523e02026cb56d329e584ae5923e94ba1, \< 12ae97c531fcd3bfd774d4dfeaeac23eafe24280; Linux 5.17.

### Is there a fix for CVE-2024-50252?

Yes. Fixed in Linux 31384aa2ad05c29c7745000f321154f42de24d1a, Linux 12ae97c531fcd3bfd774d4dfeaeac23eafe24280. Upgrade Linux to 12ae97c531fcd3bfd774d4dfeaeac23eafe24280 or later.

### How do I check if I'm affected by CVE-2024-50252?

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/d8f298eb6659eb6a38e26b79e77de4449dc6e61b>
- patch: <https://git.kernel.org/stable/c/31384aa2ad05c29c7745000f321154f42de24d1a>
- patch: <https://git.kernel.org/stable/c/c1bbdbe07f0bc3bc9f87efe4672d67208c6d6942>
- patch: <https://git.kernel.org/stable/c/12ae97c531fcd3bfd774d4dfeaeac23eafe24280>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## 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-2024-50252>

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