tcp: Fix use-after-free of nreq in reqsk_timer_handler().
In the Linux kernel, the following vulnerability has been resolved: tcp: Fix use-after-free of nreq in reqsk_timer_handler(). The cited commit replaced inet_csk_reqsk_queue_drop_and_put() with __inet_csk_reqsk_queue_drop() and reqsk_put() in reqsk_timer_handler(). Then, oreq should be passed to reqsk_put() instead of req; otherwise use-after-free of nreq could happen when reqsk is migrated but the retry attempt failed (e.g. due to timeout). Let's pass oreq to reqsk_put().
02 / AFFECTED SOFTWARE
Affected packages
1206 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
In the Linux kernel, the following vulnerability has been resolved: tcp: Fix use-after-free of nreq in reqsk_timer_handler(). The cited commit replaced inet_csk_reqsk_queue_drop_and_put() with __inet_csk_reqsk_queue_drop() and reqsk_put() in reqsk_timer_handler(). Then, oreq should be passed to reqsk_put() instead of req; otherwise use-after-free of nreq could happen when reqsk is migrated but the retry attempt failed (e.g. due to timeout). Let's pass oreq to reqsk_put().
05 / REFERENCES
Further evidence
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
- https://git.kernel.org/stable/c/2dcc86fefe09ac853158afd96b60d544af115dc5
- https://git.kernel.org/stable/c/65ed89cad1f57034c256b016e89e8c0a4ec7c65b
- https://git.kernel.org/stable/c/6d845028609a4af0ad66f499ee0bd5789122b067
- https://git.kernel.org/stable/c/9a3c1ad93e6fba67b3a637cfa95a57a6685e4908
- https://git.kernel.org/stable/c/c31e72d021db2714df03df6c42855a1db592716c
- https://git.kernel.org/stable/c/d0eb14cb8c08b00c36a3d5dc57a6f428b301f721
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/53xxx/CVE-2024-53206.json
- https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html
- https://nvd.nist.gov/vuln/detail/CVE-2024-53206