espintcp: Fix race condition in espintcp_close()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
espintcp: Fix race condition in espintcp_close()
This issue was discovered during a code audit.
After cancel_work_sync() is called from espintcp_close(), espintcp_tx_work() can still be scheduled from paths such as the Delayed ACK handler or ksoftirqd. As a result, the espintcp_tx_work() worker may dereference a freed espintcp ctx or sk.
The following is a simple race scenario:
cpu0 cpu1
espintcp_close() cancel_work_sync(&ctx->work); espintcp_write_space() schedule_work(&ctx->work);
To prevent this race condition, cancel_work_sync() is replaced with disable_work_sync().
From the CVE record · Linux
A race in the Linux kernel’s espintcp_close() can allow espintcp_tx_work() to be scheduled after work is canceled, potentially causing the worker to dereference freed context or socket memory. The issue occurs when work is scheduled during closure; the input does not establish whether an attacker can trigger it or specify network, authentication, or user-interaction requirements.
Engineers running Linux kernels with espintcp should check their versions; affected versions are not specified.