CVE-2026-43042: mpls: add seqcount to protect the platform_label{,s} pair
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mpls: add seqcount to protect the platform_label{,s} pair
The RCU-protected codepaths (mpls_forward, mpls_dump_routes) can have an inconsistent view of platform_labels vs platform_label in case of a concurrent resize (resize_platform_label_table, under platform_mutex). This can lead to OOB accesses.
This patch adds a seqcount, so that we get a consistent snapshot.
Note that mpls_label_ok is also susceptible to this, so the check against RTA_DST in rtm_to_route_config, done outside platform_mutex, is not sufficient. This value gets passed to mpls_label_ok once more in both mpls_route_add and mpls_route_del, so there is no issue, but that additional check must not be removed.
The Linux kernel CVE team has assigned CVE-2026-43042 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.1 with commit 7720c01f3f590116882e251f13c7e1d5602f8643 and fixed in 6.19.12 with commit 5bb3caf0bbfb56f1a00d2af072ac3d8395a3b9ef Issue introduced in 4.1 with commit 7720c01f3f590116882e251f13c7e1d5602f8643 and fixed in 7.0 with commit 629ec78ef8608d955ce217880cdc3e1873af3a15
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-43042
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
include/net/netns/mpls.h
net/mpls/af_mpls.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/5bb3caf0bbfb56f1a00d2af072ac3d8395a3b9ef https://git.kernel.org/stable/c/629ec78ef8608d955ce217880cdc3e1873af3a15