[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 for-2.1 3/4] qed: Make qiov match request siz
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 for-2.1 3/4] qed: Make qiov match request size until backing file EOF |
Date: |
Tue, 08 Jul 2014 19:52:12 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/08/2014 07:14 AM, Kevin Wolf wrote:
> If a QED image has a shorter backing file and a read request to
> unallocated clusters goes across EOF of the backing file, the backing
> file sees a shortened request and the rest is filled with zeros.
> However, the original too long qiov was used with the shortened request.
>
> This patch makes the qiov size match the request size, avoiding a
> potential buffer overflow in raw-posix.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/qed.c | 38 ++++++++++++++++++++++++++++++--------
> block/qed.h | 1 +
> 2 files changed, 31 insertions(+), 8 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/4] block: Fix qiov sizes, Kevin Wolf, 2014/07/04
- [Qemu-devel] [PATCH 4/4] block: Assert qiov length matches request length, Kevin Wolf, 2014/07/04
- [Qemu-devel] [PATCH 1/4] block: Make qiov match the request size until EOF, Kevin Wolf, 2014/07/04
- Re: [Qemu-devel] [PATCH for-2.1 0/4] block: Fix qiov sizes, Eric Blake, 2014/07/07
- Re: [Qemu-devel] [PATCH 0/4] block: Fix qiov sizes, Kevin Wolf, 2014/07/09