netfs: Fix potential deadlock in write-through mode
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:
netfs: Fix potential deadlock in write-through mode
Fix netfs_advance_writethrough() to always unlock the supplied folio and to mark it dirty if it isn't yet written to the end. Unfortunately, it can't be marked for writeback until the folio is done with as that may cause a deadlock against mmapped reads and writes.
Even though it has been marked dirty, premature writeback can't occur as the caller is holding both inode->i_rwsem (which will prevent concurrent truncation, fallocation, DIO and other writes) and ictx->wb_lock (which will cause flushing to wait and writeback to skip or wait).
Note that this may be easier to deal with once the queuing of folios is split from the generation of subrequests.
From the CVE record · Linux
The Linux kernel's netfs write-through handling can deadlock because a folio may be marked for writeback before it is done being used. The input does not describe an attacker action or specify whether triggering this requires network access, authentication, or user interaction.
Engineers running the Linux kernel should check whether their version includes the netfs fix; affected versions are not specified.