UBUNTU: SAUCE: (noup) fuse: do not use iocb after it may have been freed
BugLink: http://bugs.launchpad.net/bugs/1505948 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: bcba24cc ("fuse: enable asynchronous processing direct IO") Cc: <stable@vger.kernel.org> # 3.10+ (cherry picked from commit 7cabc61e git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git) Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Showing
Please register or sign in to comment