sctp: fix a TOCTOU race in SCTP_CMD_TIMER_START
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 20a785aa52c82246055a089e55df9dac47d67da1 · < 00b841bac10230c557be6b38efc48508198fe23e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
sctp: fix a TOCTOU race in SCTP_CMD_TIMER_START
The SCTP_CMD_TIMER_START handler checks timer_pending() before calling timer_reduce(). The timer can expire and detach between these operations, causing timer_reduce() to rearm the timer without taking the association reference required for the newly armed timer.
The timer callback later unconditionally drops its association reference, which can leave the association reference count unbalanced and result in use-after-free during association teardown.
Use the return value of timer_reduce() to determine whether the timer was actually armed. Take the association reference only when timer_reduce() successfully starts a new timer, closing the race between checking the timer state and rearming it.
This issue was reported by Nico Yip (@_cyeaa_) working with TrendAI Zero Day Initiative.
From the CVE record · Linux
A race in the Linux kernel's SCTP_CMD_TIMER_START handler can rearm a timer without taking the required association reference. When the timer callback drops that reference, association teardown can result in use-after-free. The input does not specify how an attacker could trigger the race or whether network access, authentication, or user interaction is required.
Engineers running the Linux kernel should check their installations; affected versions are not specified.