dax: read holder_ops once in dax_holder_notify_failure()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8012b866085523758780850087102421dbcce522 · < 7ae9d15bdcde0f2955ae13b6a95587f9e23b2359| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dax: read holder_ops once in dax_holder_notify_failure()
dax_holder_notify_failure() reads dax_dev->holder_ops twice without READ_ONCE() -- once for the NULL check and once for the indirect notify_failure() call. A concurrent fs_put_dax() can clear holder_ops between the two reads, so the check can observe a non-NULL pointer while the call dereferences NULL. (kill_dax() also clears holder_ops, but only after synchronize_srcu(), so it cannot race a reader that is inside dax_read_lock(); fs_put_dax() does no such synchronization.)
Fetch holder_ops once into a local with READ_ONCE() so the NULL check and the indirect call observe the same value.
From the CVE record · Linux
The Linux kernel's dax_holder_notify_failure() reads holder_ops twice without ensuring the value stays consistent. If fs_put_dax() clears it between the reads, the function can dereference NULL. The input does not specify an attacker access path, authentication requirements, or user interaction.
Engineers running Linux kernels with DAX should check their versions; affected versions are not specified.