Skip to content

Commit 49fcd89

Browse files
abhinavagarwal07bsbernd
authored andcommitted
fuse-io-uring: Fix UAF and NULL deref in startup error path
In fuse_uring_start(), the error path called fuse_session_destruct_uring() which frees fuse_ring, then stored the freed pointer in se->uring.pool. On session shutdown, the session loop cleanup checks if (se->uring.pool) and calls fuse_uring_stop() — dereferencing the freed memory (use-after-free). Fix by setting se->uring.pool = NULL in the error path so the cleanup check is skipped. Also add a NULL guard before the destruct call to handle the case where fuse_create_ring() itself returns NULL, which would cause a NULL pointer dereference at fuse_ring->nr_queues. Fixes CVE-2026-33150 Signed-off-by: Abhinav Agarwal <abhinav.agarwal@rubrik.com>
1 parent 7beb86c commit 49fcd89

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/fuse_uring.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,8 +925,9 @@ int fuse_uring_start(struct fuse_session *se)
925925
err:
926926
if (err) {
927927
/* Note all threads need to have been started */
928-
fuse_session_destruct_uring(fuse_ring);
929-
se->uring.pool = fuse_ring;
928+
if (fuse_ring)
929+
fuse_session_destruct_uring(fuse_ring);
930+
se->uring.pool = NULL;
930931
}
931932
return err;
932933
}

0 commit comments

Comments
 (0)