From: P J P <ppandit@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Qemu Developers <qemu-devel@nongnu.org>,
Dmitry Fleytman <dmitry@daynix.com>, Li Qiang <liqiang6-s@360.cn>
Subject: Re: [Qemu-devel] [PATCH v2] scsi: pvscsi: check request descriptor SG element count
Date: Tue, 6 Sep 2016 23:26:03 +0530 (IST) [thread overview]
Message-ID: <alpine.LFD.2.20.1609062323300.25826@wniryva> (raw)
In-Reply-To: <e65efbf5-379f-5daa-41ce-38f6e7b2c4c2@redhat.com>
Hello Paolo,
+-- On Tue, 6 Sep 2016, Paolo Bonzini wrote --+
| The commit message is not correct, because you're fixing the bug in two
| different ways: by removing the cast and by limiting the number of
| iterations in the loop.
Ah, yes; Sorry about that.
| ---
| In PVSCSI paravirtual SCSI bus, pvscsi_convert_sglist can take a very
| long time or go into an infinite loop due to two different bugs:
|
| 1) the request descriptor data length is defined to be 64 bit. While
| building SG list from a request descriptor, it gets truncated to 32bit
| in routine 'pvscsi_convert_sglist'. This could lead to an infinite loop
| situation large 'dataLen' values when data_length is cast to uint32_t
| and chunk_size becomes always zero. Fix this by removing the incorrect
| cast.
|
| 2) pvscsi_get_next_sg_elem can be called arbitrarily many times if the
| element has a zero length. Get out of the loop early when this happens,
| by introducing an upper limit on the number of SG list elements.
| ---
Done; I've sent a revised patch v3 with this commit message.
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F
prev parent reply other threads:[~2016-09-06 17:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 20:50 [Qemu-devel] [PATCH v2] scsi: pvscsi: check request descriptor SG element count P J P
2016-09-06 14:24 ` Paolo Bonzini
2016-09-06 17:56 ` P J P [this message]
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=alpine.LFD.2.20.1609062323300.25826@wniryva \
--to=ppandit@redhat.com \
--cc=dmitry@daynix.com \
--cc=liqiang6-s@360.cn \
--cc=pbonzini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).