[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Patch] virtio: security patch
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [Patch] virtio: security patch |
Date: |
Wed, 3 Aug 2011 10:01:50 +0100 |
On Wed, Aug 3, 2011 at 8:56 AM, Supriya Kannery
<address@hidden> wrote:
> For security purpose, convert 'int i' to 'unsigned int i' in
> virtio functions, so that range of index is restricted
> to positive value.
>
> Signed-off-by: Supriya Kannery (address@hidden)
>
> ---
> hw/virtio.c | 27 +++++++++++++++++----------
> hw/virtio.h | 3 ++-
> 2 files changed, 19 insertions(+), 11 deletions(-)
I think this change is good because the ints are accidents waiting to happen.
The commit message should be descriptive though: "virtio: make indices
unsigned". There is currently no bug in the code AFAICT. This is not
a security fix, just a cleanup to make the code safer.
Stefan