diff options
author | Robert Doebbelin <robert@quobyte.com> | 2016-03-07 09:50:56 +0100 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2016-03-14 15:02:50 +0100 |
commit | 7cabc61e01a0a8b663bd2b4c982aa53048218734 (patch) | |
tree | 474f0a6e0cde183d19ccb0c9b14d2358e1944012 /fs/jfs/Kconfig | |
parent | b562e44f507e863c6792946e4e1b1449fbbac85d (diff) | |
download | op-kernel-dev-7cabc61e01a0a8b663bd2b4c982aa53048218734.zip op-kernel-dev-7cabc61e01a0a8b663bd2b4c982aa53048218734.tar.gz |
fuse: do not use iocb after it may have been freed
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: Robert Doebbelin <robert@quobyte.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: bcba24ccdc82 ("fuse: enable asynchronous processing direct IO")
Cc: <stable@vger.kernel.org> # 3.10+
Diffstat (limited to 'fs/jfs/Kconfig')
0 files changed, 0 insertions, 0 deletions