Skip to content
Commit 3e8cb8b2 authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

fuse: fix stack use after return



Normal, synchronous requests will have their args allocated on the stack.
After the FR_FINISHED bit is set by receiving the reply from the userspace
fuse server, the originating task may return and reuse the stack frame,
resulting in an Oops if the args structure is dereferenced.

Fix by setting a flag in the request itself upon initializing, indicating
whether it has an asynchronous ->end() callback.

Reported-by: default avatarKyle Sanderson <kyle.leet@gmail.com>
Reported-by: default avatarMichael Stapelberg <michael+lkml@stapelberg.ch>
Fixes: 2b319d1f ("fuse: don't dereference req->args on finished request")
Cc: <stable@vger.kernel.org> # v5.4
Tested-by: default avatarMichael Stapelberg <michael+lkml@stapelberg.ch>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent bb6d3fb3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment