Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit 51e8b5fd authored by Robert Doebbelin's avatar Robert Doebbelin Committed by Harsh Shandilya
Browse files

fuse: do not use iocb after it may have been freed



commit 7cabc61e01a0a8b663bd2b4c982aa53048218734 upstream.

There's a race in fuse_direct_IO(), whereby is_sync_kiocb() is called on an
iocb that could have been freed if async io has already completed.  The fix
in this case is simple and obvious: cache the result before starting io.

It was discovered by KASan:

Kernel: ==================================================================
Kernel: BUG: KASan: use after free in fuse_direct_IO+0xb1a/0xcc0 at addr ffff88036c414390

Signed-off-by: default avatarRobert Doebbelin <robert@quobyte.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Fixes: bcba24cc ("fuse: enable asynchronous processing direct IO")
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent 9b27cfb9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment