kcm: use WRITE_ONCE() when changing lower socket callbacks
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ab7ac4eb9832e32a09f4e8042705484d2fb0aad3 · < f01fb6138f8eb606b56ce9158e2d8b72352c53f4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
kcm: use WRITE_ONCE() when changing lower socket callbacks
kcm_attach() replaces a live lower TCP socket's sk_data_ready and sk_write_space callbacks with KCM handlers, and kcm_unattach() restores them later. Those callback-pointer updates are still plain stores even though the same fields can be read and invoked concurrently on other CPUs.
If another CPU observes an older callback snapshot after the live field has already been restored, callback execution can run with a mismatched target and sk_user_data state, leading to stale or misdirected wakeups.
Use WRITE_ONCE() for the callback replacement and restore operations so these shared callback fields follow the same visibility contract already established by the earlier 4022 fixes.
From the CVE record · Linux
KCM changes live TCP socket callbacks using plain stores while other CPUs may read and invoke them concurrently. If a CPU uses an older callback after the field has been restored, it can cause stale or misdirected wakeups. The input does not establish how an attacker could trigger this or whether authentication or user interaction is required.
Engineers running Linux kernels with KCM should check their kernel versions; affected versions are not specified in the input.