fuse: fix invalidate lock leak on open O_TRUNC DAX failure
3Vexday Risk Score
Sem sinal de exploração. Nenhum artefato público de exploração conhecido até agora.
ssvc Trackepss 0.2%
probabilidade de exploração
0.2%top 94% das CVEs
exploração observada
nãonenhuma fonte reporta
In the Linux kernel, the following vulnerability has been resolved:
fuse: fix invalidate lock leak on open O_TRUNC DAX failure
fuse_open() takes filemap_invalidate_lock() for a DAX truncate
(dax_truncate = true) and releases it before the out_inode_unlock
label. But when fuse_dax_break_layouts() fails, the goto
out_inode_unlock skips the unlock and leaks the rwsem, so any later
fault or truncate on the file stalls on the stale lock.
fuse_dax_break_layouts() can fail with -ERESTARTSYS when a signal
interrupts the wait for busy DAX pages to drain:
open("file", O_RDWR | O_TRUNC)
└─ fuse_open()
├─ filemap_invalidate_lock() # dax_truncate
└─ fuse_dax_break_layouts()
└─ dax_break_layout()
└─ wait_page_idle() # TASK_INTERRUPTIBLE
└─ fuse_wait_dax_page() # unlock, schedule, re-lock
└─ signal → -ERESTARTSYS
goto out_inode_unlock # <- lock leaked
Fix this by moving filemap_invalidate_unlock() below the label so
that all error paths release the lock, and rename the label to
out_unlock as it now covers more than just the inode lock.
Produtos afetados
Linux · LinuxReferências
https://git.kernel.org/stable/c/1b04d80a27d317064cce2307472f5bef9975bc50https://git.kernel.org/stable/c/1d3e701cda2f41d48aa721b3ebefbe0fbf8d74dahttps://git.kernel.org/stable/c/7288c279ddbd654a06c82118c1a3f5570c1807f0https://git.kernel.org/stable/c/776e85fda752f9a15e0f82dec42ecacd12a9bd94https://git.kernel.org/stable/c/a61524da59a2f5ac9c8de23ff98b30da769ab144https://git.kernel.org/stable/c/a927f1867e61b78f39f9da0bbba3c98c2ca151fehttps://git.kernel.org/stable/c/dcf30a56624c2a0cfab1bada5b1ca8cc0c02f010https://git.kernel.org/stable/c/e981474d7bf1457da12404e169ea147d2c8ecea7