net: openvswitch: fix possible kfree_skb of ERR_PTR
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 893f139b9a6c00c097b9082a90f3041cfb3a0d20 · < ecc55aad3390129a87106841f4b68bf3d70c9264| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: openvswitch: fix possible kfree_skb of ERR_PTR
After the patch in the "Fixes" tag, the allocation of the "reply" skb can happen either before or after locking the ovs_mutex.
However, error cleanups still follow the classical reversed order, assuming "reply" is allocated before locking: it is freed after unlocking.
If "reply" allocation happens after locking the mutex and it fails, "reply" is left with an ERR_PTR, and execution jumps to the correspondent cleanup stage which will try to free an invalid pointer.
Fix this by setting the pointer to NULL after having saved its error value.
From the CVE record · Linux
An error path in the Linux kernel’s Open vSwitch networking code can try to free an invalid pointer when reply-buffer allocation fails after the mutex is locked. The input does not establish how an attacker could trigger this path or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with Open vSwitch networking should check their kernel version; affected versions are not specified.