tcp: Fix use-after-free of nreq in reqsk_timer_handler().
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e8c526f2bdf1845bedaf6a478816a3d06fa78b8f · < c31e72d021db2714df03df6c42855a1db592716c| No fix yet |
| Linux Linux |
|
|
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().
From the CVE record · Linux
The Linux kernel's TCP request timer handler can use a request after it is freed. This can happen when a request is migrated and a retry fails, such as due to a timeout. The input does not specify whether an attacker can trigger this over a network, whether authentication is needed, or whether user interaction is required.
Anyone running the Linux kernel should check whether their kernel includes the fix; affected versions are not specified.