Bernd Schubert
1efd3d474f
fuse-uring: make a fuse_req on SQE commit only findable after memcpy
...
Bad userspace might try to trick us and send commit SQEs request
unique / commit-id of requests that are not even send to
fuse-server (io_uring_cmd_done() not called) yet.
fuse_uring_commit_fetch() ends the fuse request when the ring entry
has a wrong state, but that could have caused a use-after-free
with the memcpy operations in fuse_uring_send_in_task().
In order to avoid such races the call of fuse_uring_add_to_pq()
is moved after the copy operations and just before completing
the io-uring request - malicious userspace cannot find the request
anymore until all prepration work in fuse-client/kernel is completed.
This also moves fuse_uring_add_to_pq() a bit up in the code to
avoid a forward declaration. Also not with a preparation commit,
to make it easier to back port to older kernels.
Reported-by: xlabai <xlabai@tencent.com >
Reported-by: Berkant Koc <me@berkoc.com >
Fixes: c090c8abae ("fuse: Add io-uring sqe commit and fetch support")
Cc: stable@kernel.org # 6.14
Signed-off-by: Bernd Schubert <bernd@bsbernd.com >
Reviewed-by: Joanne Koong <joannelkoong@gmail.com >
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com >
2026-06-15 14:06:14 +02:00
..
2026-04-24 13:37:26 -07:00
2026-04-25 07:44:26 -07:00
2026-04-21 07:30:44 -07:00
2026-04-15 12:59:16 -07:00
2026-04-13 14:20:11 -07:00
2026-03-06 14:31:28 +01:00
2026-04-13 12:46:42 -07:00
2026-04-17 09:43:12 -07:00
2026-04-13 12:19:01 -07:00
2026-04-24 13:47:19 -07:00
2026-04-21 14:03:10 -07:00
2026-02-21 17:09:51 -08:00
2026-03-06 14:31:28 +01:00
2026-04-13 17:29:12 -07:00
2026-04-02 16:15:23 +02:00
2026-02-21 17:09:51 -08:00
2026-03-29 11:21:22 -07:00
2026-04-20 10:54:17 -07:00
2026-02-21 17:09:51 -08:00
2026-03-06 14:31:28 +01:00
2026-04-21 11:16:04 -07:00
2026-04-13 16:57:31 -07:00
2026-04-21 07:30:44 -07:00
2026-04-15 19:22:16 -07:00
2026-04-17 17:08:31 -07:00
2026-04-21 14:50:04 -07:00
2026-04-13 12:46:42 -07:00
2026-03-06 14:31:28 +01:00
2026-06-15 14:06:14 +02:00
2026-04-15 19:12:04 -07:00
2026-04-13 14:20:11 -07:00
2026-04-13 16:50:38 -07:00
2026-02-21 17:09:51 -08:00
2026-03-06 14:31:28 +01:00
2026-04-15 12:59:16 -07:00
2026-04-13 17:29:12 -07:00
2026-03-06 14:31:30 +01:00
2026-04-17 17:08:31 -07:00
2026-03-06 14:31:28 +01:00
2026-04-15 19:29:18 -07:00
2026-04-13 19:03:11 -07:00
2026-04-20 10:44:02 -07:00
2026-04-13 12:46:42 -07:00
2026-04-15 12:59:16 -07:00
2026-04-24 14:20:03 -07:00
2026-01-02 13:43:41 -05:00
2026-04-20 10:44:02 -07:00
2026-04-15 12:59:16 -07:00
2025-12-01 11:58:06 +02:00
2026-04-21 07:30:44 -07:00
2026-04-22 19:05:07 +09:00
2026-04-20 10:59:47 -07:00
2026-04-21 07:30:44 -07:00
2026-04-13 14:20:11 -07:00
2025-10-20 20:22:26 +02:00
2026-04-17 17:03:43 -07:00
2026-04-21 07:30:44 -07:00
2026-04-16 20:11:56 -07:00
2026-04-15 12:59:16 -07:00
2026-04-13 12:46:42 -07:00
2026-04-13 12:46:42 -07:00
2026-03-25 13:15:36 +01:00
2026-04-05 13:53:07 -07:00
2026-04-15 12:59:16 -07:00
2026-02-18 20:50:32 -08:00
2026-04-23 17:04:18 -07:00
2026-02-24 11:13:27 -08:00
2026-04-19 12:58:08 -07:00
2026-03-18 11:41:53 -07:00
2026-04-22 15:09:01 -07:00
2026-04-16 20:11:56 -07:00
2026-04-15 19:22:16 -07:00
2026-04-13 12:46:42 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-04-13 12:19:01 -07:00
2026-04-13 17:03:48 -07:00
2026-04-15 12:59:16 -07:00
2026-04-24 00:34:59 +02:00
2025-11-28 12:42:31 +01:00
2026-04-07 11:26:11 +02:00
2026-04-03 16:53:50 -04:00
2026-01-12 14:01:32 +01:00
2026-04-13 12:19:01 -07:00
2026-04-05 13:53:39 -07:00
2026-02-21 17:09:51 -08:00
2026-01-02 12:04:28 -08:00
2026-04-23 17:08:04 -07:00
2026-02-21 17:09:51 -08:00
2026-04-13 14:20:11 -07:00
2026-04-07 12:32:22 +02:00
2026-04-21 14:12:01 -07:00
2026-04-21 07:30:44 -07:00
2025-07-31 14:57:54 -07:00
2025-10-20 20:22:26 +02:00
2026-02-21 17:09:51 -08:00
2026-04-24 00:37:01 +02:00
2026-04-01 12:26:07 -07:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-02-25 10:34:23 -08:00
2026-04-13 15:17:28 -07:00
2026-04-13 14:20:11 -07:00
2026-01-16 12:52:04 -05:00
2026-04-13 14:20:11 -07:00
2025-11-05 09:51:30 +01:00
2026-02-19 14:34:26 +01:00
2026-01-14 16:50:37 +01:00
2026-04-23 17:08:04 -07:00
2026-03-06 14:31:28 +01:00
2026-02-21 17:09:51 -08:00
2026-02-09 16:58:28 -08:00
2026-04-21 07:30:44 -07:00
2026-04-13 15:17:28 -07:00
2025-09-01 13:08:01 +02:00
2026-02-19 21:51:00 +09:00
2025-09-03 20:49:32 -07:00
2026-04-13 12:46:42 -07:00
2026-04-20 10:44:02 -07:00
2026-02-19 21:51:00 +09:00
2026-04-13 14:20:11 -07:00
2026-02-21 01:02:28 -08:00
2026-01-12 16:52:09 +01:00
2026-04-15 12:59:16 -07:00
2026-04-13 14:20:11 -07:00
2026-04-14 09:30:15 +02:00
2026-04-13 12:19:01 -07:00
2026-01-12 16:52:09 +01:00
2026-03-23 12:41:58 +01:00
2026-04-13 13:27:11 -07:00
2026-03-06 14:31:28 +01:00
2025-09-15 21:26:44 -04:00
2025-09-15 21:26:44 -04:00
2026-02-21 01:02:28 -08:00
2026-01-12 10:55:45 +01:00
2026-03-24 14:44:02 +01:00
2026-04-13 14:20:11 -07:00
2026-02-21 01:02:28 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-01-16 12:52:04 -05:00
2026-01-16 12:52:04 -05:00
2026-02-21 17:09:51 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 17:09:51 -08:00
2026-04-18 00:10:56 -07:00
2026-01-16 12:52:03 -05:00
2026-03-02 11:06:42 +01:00