mptcp: pm: ADD_ADDR rtx: free sk if last
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 00cfd77b9063dcdf3628a7087faba60de85a9cc8 · < b74ad20198652b6b39a761c277ba65ae82b1e107| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mptcp: pm: ADD_ADDR rtx: free sk if last
When an ADD_ADDR is retransmitted, the sk is held in sk_reset_timer(), and released at the end.
If at that moment, it was the last reference being held, the sk would not be freed. sock_put() should then be called instead of __sock_put().
But that's not enough: if it is the last reference, sock_put() will call sk_free(), which will end up calling sk_stop_timer_sync() on the same timer, and waiting indefinitely to finish. So it is needed to mark that the timer is done at the end of the timer handler when it has not been rescheduled, not to call sk_stop_timer_sync() on "itself".
From the CVE record · Linux
During MPTCP ADD_ADDR retransmission, the Linux kernel can fail to free a socket when the timer holds its last reference. Freeing the socket from that timer handler can instead cause an indefinite wait on the same timer. The input does not establish whether an attacker can trigger this, or what access, authentication, or user interaction would be required.
Operators running Linux kernels with MPTCP support should check whether their kernel is affected; affected versions were not provided.