CVE-2026-74664: net: openvswitch: reallocate update replies for mismatched IDs

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026082228-CVE-2026-74664-59ea@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

net: openvswitch: reallocate update replies for mismatched IDs

ovs_flow_cmd_new() preallocates the optional reply skb before it takes
ovs_mutex and before it knows which existing flow will be updated.

That is normally fine because the skb is sized from the request flow
identifier.  That identifier also becomes the inserted flow's identifier.
For updates, however, a request with a UFID may miss the UFID lookup and
then fall back to the flow key lookup.  That lookup can legitimately find
an existing key-identified flow.  UFIDs are optional and the flow key is
the primary identifier.

For echoed replies, ovs_flow_cmd_fill_info() writes the matched flow's
identifier, not the request identifier used for the preallocation.  A short
request UFID can therefore leave too little room for the key identifier.
The fill can then fail with -EMSGSIZE and hit the BUG_ON(error < 0) in the
update path.

Once the update target has been resolved, reallocate the reply skb if the
matched flow needs a larger reply than the request identifier allowed.  Do
this before replacing the actions so the request can still fail cleanly if
the rare extra allocation fails.

The Linux kernel CVE team has assigned CVE-2026-74664 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 4.0 with commit 74ed7ab9264c54471c7f057409d352052820d750 and fixed in 5.10.265 with commit bd8ca84d48cd9a4f6fc63df26512c55e1d339927
	Issue introduced in 4.0 with commit 74ed7ab9264c54471c7f057409d352052820d750 and fixed in 5.15.216 with commit 00f987f066e802793a37dd2167459e67cf2cf2ec
	Issue introduced in 4.0 with commit 74ed7ab9264c54471c7f057409d352052820d750 and fixed in 6.1.183 with commit 696a0b9435fce9cf4f1e9ba7f6afa6bee96c97fc
	Issue introduced in 4.0 with commit 74ed7ab9264c54471c7f057409d352052820d750 and fixed in 6.6.152 with commit 87d0c0040b5d4b61de51ae39132c4c46709f2f77
	Issue introduced in 4.0 with commit 74ed7ab9264c54471c7f057409d352052820d750 and fixed in 6.12.104 with commit 69f40ccf85074981340847d650a9cbf9adabfbbe
	Issue introduced in 4.0 with commit 74ed7ab9264c54471c7f057409d352052820d750 and fixed in 6.18.45 with commit 23716dd9d8d46a5908536b73dc085e62f2b5c237
	Issue introduced in 4.0 with commit 74ed7ab9264c54471c7f057409d352052820d750 and fixed in 7.1.9 with commit 20751193d83be2e9735d4faee71375691c09cd13
	Issue introduced in 4.0 with commit 74ed7ab9264c54471c7f057409d352052820d750 and fixed in 7.2 with commit 5d1c224dd914579524a183a514c12b95095d12ce

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-74664
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/datapath.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/bd8ca84d48cd9a4f6fc63df26512c55e1d339927
	https://git.kernel.org/stable/c/00f987f066e802793a37dd2167459e67cf2cf2ec
	https://git.kernel.org/stable/c/696a0b9435fce9cf4f1e9ba7f6afa6bee96c97fc
	https://git.kernel.org/stable/c/87d0c0040b5d4b61de51ae39132c4c46709f2f77
	https://git.kernel.org/stable/c/69f40ccf85074981340847d650a9cbf9adabfbbe
	https://git.kernel.org/stable/c/23716dd9d8d46a5908536b73dc085e62f2b5c237
	https://git.kernel.org/stable/c/20751193d83be2e9735d4faee71375691c09cd13
	https://git.kernel.org/stable/c/5d1c224dd914579524a183a514c12b95095d12ce
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.