sctp: hold asoc or transport before mod_timer() in timer handlers
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.15.222, 6.1.189, 6.6.158, 6.12.112, 6.18.55, and 1 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: sctp: hold asoc or transport before mod_timer() in timer handlers Take the association or transport reference before rearming a timer in the timer handlers. The existing code calls mod_timer() before taking the reference needed by the rearmed timer without holding the sock lock. This creates a race with timer cleanup: if the timer is deleted after mod_timer() returns but before the reference is taken, the cleanup path can drop the timer's reference and destroy the transport or association. The timer handler then takes a reference on the already freed object and eventually drops it, causing a refcount underflow. Hold the object before mod_timer() and drop the reference if mod_timer() reports that the timer was already pending in timer handlers. Apply the same ordering to the proto-unreachable path, which can rearm a transport timer outside the timer handlers without holding the sock lock.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in f7dea7eaea20fe9b80f8f77ba44d02b4a17f8050; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in f9d929026d487a988bfa12c065f892e823e5b6ab; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 9d3d39da054476e7aa05cd877b93ca73a9a77434; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 27c51a9b55b227309161c903f9ecfbf022516bc2; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in d18cb8fd1b6ba95c85de644203cfe1b071ff0c0f; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in 35bf3b23c9a871f44c1453d85f8332be4e088dda; From 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · fixed in cae23ae3f7887a1cf8a75da38edcebeef695040f
- Linux Linux
2.6.12
- KernelLinux
From 2.6.12 · fixed in 5.15.222; From 5.16.0 · fixed in 6.1.189; From 6.2.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.112; From 6.13.0 · fixed in 6.18.55; From 6.19.0 · fixed in 7.2.9
References 7
git.kernel.org
- stable/c/f7dea7eaea20fe9b80f8f77ba44d02b4a17f8050
- stable/c/f9d929026d487a988bfa12c065f892e823e5b6ab
- stable/c/9d3d39da054476e7aa05cd877b93ca73a9a77434
- stable/c/27c51a9b55b227309161c903f9ecfbf022516bc2
- stable/c/d18cb8fd1b6ba95c85de644203cfe1b071ff0c0f
- stable/c/35bf3b23c9a871f44c1453d85f8332be4e088dda
- stable/c/cae23ae3f7887a1cf8a75da38edcebeef695040f