diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2017-04-10 19:36:26 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-08 08:26:08 (GMT) |
commit | 26899ca9cc6fc5e29c1f489d76a246bcad745f2d (patch) | |
tree | 6701ac3fad51a7c7ac9e97c80ada14a902ddbbf0 /sound/aoa | |
parent | c17acd24c682322563c9c35bd7ed94f13fed3664 (diff) | |
download | linux-26899ca9cc6fc5e29c1f489d76a246bcad745f2d.tar.xz |
Btrfs: fix potential use-after-free for cloned bio
[ Upstream commit a967efb30b3afa3d858edd6a17f544f9e9e46eea ]
KASAN reports that there is a use-after-free case of bio in btrfs_map_bio.
If we need to submit IOs to several disks at a time, the original bio
would get cloned and mapped to the destination disk, but we really should
use the original bio instead of a cloned bio to do the sanity check
because cloned bios are likely to be freed by its endio.
Reported-by: Diego <diegocg@gmail.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/aoa')
0 files changed, 0 insertions, 0 deletions