Skip to content

fuse: fix io-uring abort races and cancel null deref

Joanne Koong fuse-devel stable 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v23 patches 4 repliesSuperseded
  3. v13 patches 7 repliesSuperseded

Changes in v3 from the cover letter

* Add Bernd's Reviewed-by
* Change co-developed-bys to suggested-bys

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fuse: fix race between registration and connection abortionfs/fuse/dev_uring.c+16 -60 replies
2/3fuse: check connection abort during ring creationfs/fuse/dev_uring.c+4 -00 replies
3/3fuse: fix moving cancelled entry to ent_in_userspace listfs/fuse/dev_uring.c fs/fuse/dev_uring_i.h+7 -50 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchBernd SchubertHeechan Kang
1/3R-b
2/3R-b
3/3R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] fuse: fix io-uring abort races and cancel null deref

Patch 1 and 2 address races between abort and fuse uring ring creation / registration. Patch 3 fixes fuse_uring_cancel() moving cancelled entries (which have no fuse_req) to ent_in_userspace, which can crash ent_list_request_expired(). It also removes the queue_refs > 0 gate in fuse_uring_abort() so that request flushing always happens, since cancel now decrements queue_refs directly.

For some more context, please see the discussions in [1].

[1] https://lore.kernel.org/linux-fsdevel/20251021-io-uring-fixes-cancel-mem-leak-v1-0-26b78b2c973c@ddn.com/

Changelog
--------
v2: https://lore.kernel.org/fuse-devel/[email protected]/
v2 -> v3:
* Add Bernd's Reviewed-by
* Change co-developed-bys to suggested-bys

v1: https://lore.kernel.org/fuse-devel/[email protected]/
v1 -> v2:
* Reorder commits 1 and 2 and edit commit 1 message (Bernd)

Joanne Koong (3):
fuse: fix race between registration and connection abortion
fuse: check connection abort during ring creation
fuse: fix moving cancelled entry to ent_in_userspace list

 fs/fuse/dev_uring.c   | 32 ++++++++++++++++++++++++--------
 fs/fuse/dev_uring_i.h |  6 +++---
 2 files changed, 27 insertions(+), 11 deletions(-)
Signature · 1 line
2.52.0