Files
linux/fs/btrfs
Liu Bo 26899ca9cc Btrfs: fix potential use-after-free for cloned bio
[ Upstream commit a967efb30b ]

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>
2017-10-08 10:26:08 +02:00
..
2016-09-26 18:08:44 +02:00
2015-10-06 06:55:23 -07:00
2016-10-24 18:20:29 +02:00
2016-07-26 13:52:25 +02:00
2016-08-03 14:08:37 -07:00
2017-06-14 15:06:00 +02:00
2016-09-26 18:08:44 +02:00
2016-09-26 17:59:49 +02:00
2016-09-26 18:08:44 +02:00
2016-09-26 18:08:44 +02:00
2016-09-26 18:08:44 +02:00