Re: [PATCH 1/2] fuse: copy request headers via a stack buffer for io-uring
From: Joanne Koong
Date: Mon Jul 06 2026 - 17:17:36 EST
On Mon, Jul 6, 2026 at 12:13 PM Xiang Mei <xmei5@xxxxxxx> wrote:
>
> The fuse-io-uring transport copies req->in.h out to the ring in
> fuse_uring_copy_to_ring() and req->out.h back in fuse_uring_commit().
> Both headers live inside the fuse_request slab object, whose cache
> (fuse_req_cachep) is created without a usercopy whitelist, so copying
> them directly to/from userspace trips CONFIG_HARDENED_USERCOPY and
> panics:
>
> usercopy: Kernel memory exposure attempt detected from SLUB object
> 'fuse_request' (offset 56, size 40)!
> kernel BUG at mm/usercopy.c:102!
> RIP: 0010:usercopy_abort+0x6c/0x80
> Call Trace:
> __check_heap_object
> __check_object_size
> copy_header_to_ring fs/fuse/dev_uring.c:618
> fuse_uring_prepare_send
> fuse_uring_send_in_task
> ...
> __do_sys_io_uring_enter
> entry_SYSCALL_64_after_hwframe
>
> Bounce both headers through an on-stack copy so the usercopy touches
> stack memory, not the slab object.
>
> Fixes: c090c8abae4b ("fuse: Add io-uring sqe commit and fetch support")
> Reported-by: Weiming Shi <bestswngs@xxxxxxxxx>
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Xiang Mei <xmei5@xxxxxxx>
Reviewed-by: Joanne Koong <joannelkoong@xxxxxxxxx>
I think the cc stable@xxxxxxxxxxxxxxx tag is missing here. I added
stable@ to the cc list on this email, but I'm not sure if they require
the tag being explicitly in the commit message to get it backported.
Thanks,
Joanne