inet: inet_defrag: prevent sk release while still in use
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7026b1ddb6b8d4e6ee33dc2bd06c0ca8746fa7ab · < e09cbe017311508c21e0739e97198a8388b98981| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
inet: inet_defrag: prevent sk release while still in use
ip_local_out() and other functions can pass skb->sk as function argument.
If the skb is a fragment and reassembly happens before such function call returns, the sk must not be released.
This affects skb fragments reassembled via netfilter or similar modules, e.g. openvswitch or ct_act.c, when run as part of tx pipeline.
Eric Dumazet made an initial analysis of this bug. Quoting Eric: Calling ip_defrag() in output path is also implying skb_orphan(), which is buggy because output path relies on sk not disappearing.
A relevant old patch about the issue was : 8282f27449bf ("inet: frag: Always orphan skbs inside ip_defrag()")
[..]
From the CVE record · Linux
The Linux kernel can release a socket while the transmit path still uses it if a packet fragment is reassembled through netfilter or a similar module. An attacker who can cause this reassembly may trigger the faulty socket release; the input does not specify whether this requires local or network access, authentication, or user interaction.
Engineers running the Linux kernel should check affected versions; none are specified in the input.