CVE-2026-74664: net: openvswitch: reallocate update replies for mismatched IDs
In the Linux kernel, the following vulnerability has been resolved:
net: openvswitch: reallocate update replies for mismatched IDs
ovsflowcmdnew() preallocates the optional reply skb before it takes ovsmutex 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, ovsflowcmdfillinfo() 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 BUGON(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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.152.1-1
Event History
Frequently Asked Questions
What conditions are required to trigger the failure?
An update request must include a UFID that misses UFID-based lookup, then fall back to a flow-key lookup that finds an existing flow. The request UFID must be shorter than the identifier required for the matched flow's echoed reply, causing reply construction to fail with -EMSGSIZE.
What is the impact if the vulnerable update path is reached?
The update path can reach BUG_ON(error < 0) after reply filling fails, resulting in a kernel BUG. The described failure occurs while handling an Open vSwitch flow update reply.
Are flows without UFIDs relevant?
Yes. UFIDs are optional, while the flow key is the primary identifier. A request can fail UFID lookup and legitimately match an existing key-identified flow through fallback key lookup.
What does the fix change?
The fix reallocates the optional reply skb after the update target is resolved when the matched flow requires more reply space than was allocated from the request identifier. It performs this before replacing actions so an allocation failure can be handled cleanly.