inet: fully convert sk->sk_rx_dst to RCU rules
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 41063e9dd11956f2d285e12e4342e1d232ba0ea2 · < 0249a4b8a554f2eb6a27b62516fa50168584faa4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
inet: fully convert sk->sk_rx_dst to RCU rules
syzbot reported various issues around early demux, one being included in this changelog [1]
sk->sk_rx_dst is using RCU protection without clearly documenting it.
And following sequences in tcp_v4_do_rcv()/tcp_v6_do_rcv() are not following standard RCU rules.
[a] dst_release(dst); [b] sk->sk_rx_dst = NULL;
They look wrong because a delete operation of RCU protected pointer is supposed to clear the pointer before the call_rcu()/synchronize_rcu() guarding actual memory freeing.
In some cases indeed, dst could be freed before [b] is done.
From the CVE record · Linux
The Linux kernel can free an RCU-protected destination pointer before clearing it, causing a use-after-free during TCP early demux. The issue was observed while processing received packets; the input does not establish an attacker’s required access, authentication, user interaction, or further impact.
Engineers running the Linux kernel should check their deployments; affected versions are not specified in the input.