CVE-2025-37789: net: openvswitch: fix nested key length validation in the set() action
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
net: openvswitch: fix nested key length validation in the set() action
It's not safe to access nla_len(ovs_key) if the data is smaller than the netlink header. Check that the attribute is OK first.
The Linux kernel CVE team has assigned CVE-2025-37789 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.3 with commit ccb1352e76cff0524e7ccb2074826a092dd13016 and fixed in 6.1.135 with commit 1489c195c8eecd262aa6712761ba5288203e28ec Issue introduced in 3.3 with commit ccb1352e76cff0524e7ccb2074826a092dd13016 and fixed in 6.6.88 with commit 824a7c2df5127b2402b68a21a265d413e78dcad7 Issue introduced in 3.3 with commit ccb1352e76cff0524e7ccb2074826a092dd13016 and fixed in 6.12.25 with commit be80768d4f3b6fd13f421451cc3fee8778aba8bc Issue introduced in 3.3 with commit ccb1352e76cff0524e7ccb2074826a092dd13016 and fixed in 6.14.4 with commit 03d7262dd53e8c404da35cc81aaa887fd901f76b Issue introduced in 3.3 with commit ccb1352e76cff0524e7ccb2074826a092dd13016 and fixed in 6.15-rc3 with commit 65d91192aa66f05710cfddf6a14b5a25ee554dba
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-2025-37789
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/1489c195c8eecd262aa6712761ba5288203e28ec https://git.kernel.org/stable/c/824a7c2df5127b2402b68a21a265d413e78dcad7 https://git.kernel.org/stable/c/be80768d4f3b6fd13f421451cc3fee8778aba8bc https://git.kernel.org/stable/c/03d7262dd53e8c404da35cc81aaa887fd901f76b https://git.kernel.org/stable/c/65d91192aa66f05710cfddf6a14b5a25ee554dba