net: openvswitch: conntrack: avoid modifying shared unconfirmed ct entry
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ cae3a2627520c3795b54533c5328b77af3405dbe · < e2829ae5459ddb5fce526b2e84697edf6c0c3cef| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: openvswitch: conntrack: avoid modifying shared unconfirmed ct entry
In a case where skb with an unconfirmed ct entry gets cloned, we may end up committing both but with different sets of extensions.
The series of events:
1. The first clone wants to commit and runs the helpers wiring up the extension pointer into the expectation list. 2. Then it looses the confirmation keeping the entry unconfirmed. 3. Second clone now wants to commit labels and adds the new extension for that breaking the pointer in the expectation list causing UAF on the destruction path later.
While this is possible to trigger, there should be no practical network pipeline where committing both clones without modifications into the same zone is needed. So, let's just reset the entry in case for some reason we got an skb with a shared one during commit. This doesn't affect any known use cases, but avoids any potential problems with sharing and modification of the unconfirmed ct entry.
The fixes tag points to the introduction of helpers, since that's the main UAF trigger for the sharing.
From the CVE record · Linux
The Linux kernel’s Open vSwitch conntrack code can modify a shared, unconfirmed conntrack entry when cloned packets are committed with different extensions. This can break a pointer in the expectation list and cause a use-after-free when the entry is later destroyed. The input does not specify whether authentication or user interaction is required.
Engineers running the Linux kernel with Open vSwitch conntrack should check their versions against the vendor advisory; affected versions are not specified.