fuse: wait for sync init request after abort
Subsystems (2)
PATCH 1/1 fuse: wait for sync init request after abort
After a fatal signal interrupts synchronous FUSE_INIT, request_wait_answer() aborts the channel and returns immediately. If the request is in an FR_LOCKED reply-copy interval, fuse_chan_abort() leaves it for the writer to finish. The synchronous caller can then free the fuse_init_args that owns the reply destination while the writer is still copying into it.
Wait for fuse_request_end() after aborting the channel. This keeps the synchronous caller's reply storage alive until any locked copy has finished, while preserving the fatal-signal abort behavior.
Bug found and triaged by OpenAI Security Research and validated by Trail of Bits.
---
Trail of Bits has a reproducer for this bug that triggers a KASAN use-after-free and can share if needed.
fs/fuse/dev.c | 2 ++ 1 file changed, 2 insertions(+)
fs/fuse/dev.c +2 -0
@@ -725,6 +725,8 @@ static void request_wait_answer(struct fuse_req *req)if (req->args->abort_on_kill) {fuse_chan_abort (fch, false); +wait_event (req->waitq, +test_bit (FR_FINISHED , &req->flags));return ; }
Signature · 1 line
2.53.0
Quoted 7 lines · On Friday, 31 July 2026 14:03:52 CEST David Lee wrote:
Fixes 204aa22a686b ("fuse: abort on fatal signal during sync init")Bug found and triaged by OpenAI Security Research and validated by Trail of Bits.
Assisted-by Codex:gpt-5.6-sol gpt-5.5-cyberSigned-off-by Kyle Zeng <[email protected]>
1. weird text (advertisement) + newlines in the tags section which shouldn't be there
https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
(and all these tag/format related sections below)
2. author didn't sign off the patch (see below)
3. odd unrelated Signed-off-by without any obvious connection to the patch
- I actually would guess that Kyle Zeng <[email protected]> is the author and David Lee removed its authorship (From: ) before sending the patch. But in its current form, David is claiming to be the author. And even when it is the case, David must still add the the non-Author SoB at the end.
Regards,
Sven
Miklos Szeredi
maintainerQuoted 12 lines · David Lee
After a fatal signal interrupts synchronous
FUSE_INIT,request_wait_answer()aborts the channel and returns immediately. If the request is in anFR_LOCKEDreply-copy interval,fuse_chan_abort()leaves it for the writer to finish. The synchronous caller can then free thefuse_init_argsthat owns the reply destination while the writer is still copying into it.Wait for
fuse_request_end()after aborting the channel. This keeps the synchronous caller's reply storage alive until any locked copy has finished, while preserving the fatal-signal abort behavior.
Quoted 7 lines
Fixes 204aa22a686b ("fuse: abort on fatal signal during sync init")Bug found and triaged by OpenAI Security Research and validated by Trail of Bits.
Assisted-by Codex:gpt-5.6-sol gpt-5.5-cyberSigned-off-by Kyle Zeng <[email protected]>
Thanks for the report and patch.
I've committed an equivalent fix to fuse.git #for-next:
64b0b5cacbd2 ("fuse: wait for FR_FINISHED on abort_on_kill to prevent use-after-free")
Thanks,
Miklos