Re: [PATCH] Btrfs: fix potential use-after-free for cloned bio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 10, 2017 at 12:36:26PM -0700, Liu Bo wrote:
> 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@xxxxxxxxx>
> Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux