CVE-2026-31679: openvswitch: validate MPLS set/set_masked payload length
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
openvswitch: validate MPLS set/set_masked payload length
validate_set() accepted OVS_KEY_ATTR_MPLS as variable-sized payload for SET/SET_MASKED actions. In action handling, OVS expects fixed-size MPLS key data (struct ovs_key_mpls).
Use the already normalized key_len (masked case included) and reject non-matching MPLS action key sizes.
Reject invalid MPLS action payload lengths early.
The Linux kernel CVE team has assigned CVE-2026-31679 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.5 with commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3 and fixed in 5.10.253 with commit 68f32ef0683c8d1c05cd2e4f16818fa63ff59c6f Issue introduced in 5.5 with commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3 and fixed in 5.15.203 with commit 4cae986225f8b8679ad86b924918e7d75a96aa61 Issue introduced in 5.5 with commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3 and fixed in 6.1.168 with commit 8ed7b9930cbc3bc71f868fa79a68700ac88d586a Issue introduced in 5.5 with commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3 and fixed in 6.6.131 with commit c1f97152df8dfb17e855ddf0fc409b7bd13e9700 Issue introduced in 5.5 with commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3 and fixed in 6.12.80 with commit 98de18d327ef8cbbb704980e359e4872d8c28997 Issue introduced in 5.5 with commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3 and fixed in 6.18.21 with commit bd50c7484c3bb34097571c1334174fb8b7408036 Issue introduced in 5.5 with commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3 and fixed in 6.19.11 with commit 2ca33b88a79ca42f017ae0f7011280325655438e Issue introduced in 5.5 with commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3 and fixed in 7.0 with commit 546b68ac893595877ffbd7751e5c55fd1c43ede6
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-31679
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:
net/openvswitch/flow_netlink.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/68f32ef0683c8d1c05cd2e4f16818fa63ff59c6f https://git.kernel.org/stable/c/4cae986225f8b8679ad86b924918e7d75a96aa61 https://git.kernel.org/stable/c/8ed7b9930cbc3bc71f868fa79a68700ac88d586a https://git.kernel.org/stable/c/c1f97152df8dfb17e855ddf0fc409b7bd13e9700 https://git.kernel.org/stable/c/98de18d327ef8cbbb704980e359e4872d8c28997 https://git.kernel.org/stable/c/bd50c7484c3bb34097571c1334174fb8b7408036 https://git.kernel.org/stable/c/2ca33b88a79ca42f017ae0f7011280325655438e https://git.kernel.org/stable/c/546b68ac893595877ffbd7751e5c55fd1c43ede6