All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: P J P <ppandit@redhat.com>
Cc: Qemu Developers <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>, Li Qiang <liqiang6-s@360.cn>,
	Hannes Reinecke <hare@suse.de>
Subject: Re: [Qemu-devel] [PATCH 1/3] scsi: megasas: use appropriate property buffer size
Date: Wed, 25 May 2016 14:30:13 +0200	[thread overview]
Message-ID: <57459AD5.2070207@suse.de> (raw)
In-Reply-To: <alpine.LFD.2.20.1605251742110.15974@wniryva>

On 05/25/2016 02:15 PM, P J P wrote:
> +-- On Wed, 25 May 2016, Alexander Graf wrote --+
> | >    http://git.qemu.org/?p=qemu.git;a=blob;f=hw/scsi/megasas.c;h=a63a581550a328d0326ddee4f7fe1c4ffdecc194;hb=HEAD#l1439
> | > 'dcmd_size' is same as that of 'info' object.
> |
> | Ok, then this patch is definitely bogus. The guest may receive less than the
> | size of the info object. So we really want to have a MIN() between the maximum
> | allowed transfer size (sizeof(info)) and the requested size (cmd->iov_size)
> | here.
>
> There is also a check which returns an invalid parameter error if
> 'cmd->iov_size' is less than 'dcmd_size'. Ie. OOB access occurs when
> cmd->iov_size is greater than 'dcmd_size'.

Turns out you're much better at reading code than me - yes, true, all is 
good :)

Reviewed-by: Alexander Graf <agraf@suse.de>

Alex

  reply	other threads:[~2016-05-25 12:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 10:31 [Qemu-devel] [PATCH 0/3] Qemu: scsi: megasas: various OOB r/w access checks P J P
2016-05-25 10:31 ` [Qemu-devel] [PATCH 1/3] scsi: megasas: use appropriate property buffer size P J P
2016-05-25 11:06   ` Alexander Graf
2016-05-25 11:51     ` P J P
2016-05-25 11:53       ` Alexander Graf
2016-05-25 12:15         ` P J P
2016-05-25 12:30           ` Alexander Graf [this message]
2016-05-25 10:31 ` [Qemu-devel] [PATCH 2/3] scsi: megasas: initialise local configuration data buffer P J P
2016-05-25 11:15   ` Alexander Graf
2016-05-25 10:31 ` [Qemu-devel] [PATCH 3/3] scsi: megasas: check 'read_queue_head' index value P J P
2016-05-25 11:20   ` Alexander Graf
2016-05-25 13:21     ` Hannes Reinecke
2016-05-25 12:00 ` [Qemu-devel] [PATCH 0/3] Qemu: scsi: megasas: various OOB r/w access checks Paolo Bonzini
2016-05-25 12:08   ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57459AD5.2070207@suse.de \
    --to=agraf@suse.de \
    --cc=hare@suse.de \
    --cc=liqiang6-s@360.cn \
    --cc=pbonzini@redhat.com \
    --cc=ppandit@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.