Linux: sctp: fix a TOCTOU race in SCTP_CMD_TIMER_START
What fixes it
- 3205a20f837f5b1f009427ac3d9f706bf8a6fbecLinuxCVE List
- 755d70ca845fd9b87c7b338ae6ae832b08cd0005LinuxCVE List
- 09e7f9290d63178f56095d5c18fb9f9470153db5LinuxCVE List
- 00b841bac10230c557be6b38efc48508198fe23eLinuxCVE List
- 3d698d1e6c8bc41e3e1707777a016f1bdd07842dLinuxCVE List
- 2188569e7e1b0bc3f3b557dc97ab7a02befc11c8LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
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.
Text from CVE List
Affected versions 24
- Linuxaffected: 20a785aa52c82246055a089e55df9dac47d67da1 before cbf2df9aac4202f9fb0b361a7fe8c79b29fad92cCVE List
- Linuxaffected: 20a785aa52c82246055a089e55df9dac47d67da1 before 3205a20f837f5b1f009427ac3d9f706bf8a6fbecCVE List
- Linuxaffected: 20a785aa52c82246055a089e55df9dac47d67da1 before 755d70ca845fd9b87c7b338ae6ae832b08cd0005CVE List
- Linuxaffected: 20a785aa52c82246055a089e55df9dac47d67da1 before 09e7f9290d63178f56095d5c18fb9f9470153db5CVE List
- Linuxaffected: 20a785aa52c82246055a089e55df9dac47d67da1 before e42ba56281ca3ae2dcb3558bebee9a1c9a4831d9CVE List
- Linuxaffected: 20a785aa52c82246055a089e55df9dac47d67da1 before 00b841bac10230c557be6b38efc48508198fe23eCVE List
- Linuxaffected: 20a785aa52c82246055a089e55df9dac47d67da1 before 3d698d1e6c8bc41e3e1707777a016f1bdd07842dCVE List
- Linuxaffected: 20a785aa52c82246055a089e55df9dac47d67da1 before 2188569e7e1b0bc3f3b557dc97ab7a02befc11c8CVE List
- Linuxaffected: 9c0a4652f750afe3b4468cbcd9335b244ce2facdCVE List
- Linuxaffected: 70989e501fbce502198d82da88358ce453575a05CVE List
- Linuxaffected: 085bb270b4b1168c93afb37bbafc881207d15443CVE List
- Linuxaffected: 4.19.126 before 4.20CVE List
- Linuxaffected: 5.4.44 before 5.5CVE List
- Linuxaffected: 5.6.16 before 5.7CVE List
- Linuxaffected: 5.7CVE List
- Linuxunaffected: all versions before 5.7CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.111 through 6.12.*CVE List
- Linuxunaffected: 6.18.53 through 6.18.*CVE List
- Linuxunaffected: 7.2.7 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 8
- git.kernel.org/stable/c/cbf2df9aac4202f9fb0b361a7fe8c79b29fad92cReferencevia CVE List
- git.kernel.org/stable/c/3205a20f837f5b1f009427ac3d9f706bf8a6fbecReferencevia CVE List
- git.kernel.org/stable/c/755d70ca845fd9b87c7b338ae6ae832b08cd0005Referencevia CVE List
- git.kernel.org/stable/c/09e7f9290d63178f56095d5c18fb9f9470153db5Referencevia CVE List
- git.kernel.org/stable/c/e42ba56281ca3ae2dcb3558bebee9a1c9a4831d9Referencevia CVE List
- git.kernel.org/stable/c/00b841bac10230c557be6b38efc48508198fe23eReferencevia CVE List
- git.kernel.org/stable/c/3d698d1e6c8bc41e3e1707777a016f1bdd07842dReferencevia CVE List
- git.kernel.org/stable/c/2188569e7e1b0bc3f3b557dc97ab7a02befc11c8Referencevia CVE List