qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Thomas Huth <thuth@redhat.com>, P J P <ppandit@redhat.com>,
	Qemu Developers <qemu-devel@nongnu.org>
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Prasad J Pandit" <pjp@fedoraproject.org>,
	"Arash TC" <tohidi.arash@gmail.com>,
	"QEMU Trivial" <qemu-trivial@nongnu.org>,
	qemu-stable@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] bt: use size_t type for length parameters instead of int
Date: Wed, 28 Nov 2018 10:05:53 +0100	[thread overview]
Message-ID: <5f55f7a6-1ec6-dfec-145d-b1cdeab2049f@vivier.eu> (raw)
In-Reply-To: <76e37406-4268-5f3e-2666-82eb5ef4dd45@redhat.com>

On 28/11/2018 09:53, Thomas Huth wrote:
> On 2018-11-19 12:07, P J P wrote:
>> From: Prasad J Pandit <pjp@fedoraproject.org>
>>
>> The length parameter values are not negative, thus use an unsigned
>> type 'size_t' for them. Many routines pass 'len' values to memcpy(3)
>> calls. If it was negative, it could lead to memory corruption issues.
>> Add check to avoid it.
>>
>> Reported-by: Arash TC <tohidi.arash@gmail.com>
>> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
>> ---
>>  bt-host.c              |  8 +++---
>>  bt-vhci.c              |  7 +++---
>>  hw/bt/core.c           |  2 +-
>>  hw/bt/hci-csr.c        | 32 ++++++++++++------------
>>  hw/bt/hci.c            | 38 ++++++++++++++--------------
>>  hw/bt/hid.c            | 10 ++++----
>>  hw/bt/l2cap.c          | 56 ++++++++++++++++++++++--------------------
>>  hw/bt/sdp.c            |  6 ++---
>>  hw/usb/dev-bluetooth.c | 12 ++++-----
>>  include/hw/bt.h        |  8 +++---
>>  include/sysemu/bt.h    | 10 ++++----
>>  11 files changed, 96 insertions(+), 93 deletions(-)
>>
>> Update v2: modify assert calls
>>   -> https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg01036.html
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 
> Even though it's a rather big patch, I think the changes are trivial
> enough so that it could go via qemu-trivial (now on CC:). If not, maybe
> Paolo could take it through his "misc" tree?

I'll take this patch via qemu-trivial only if I get clearance from
Paolo. BTW, I don't plan any qemu-trivial pull request before the final rc.

Thanks,
Laurent

  reply	other threads:[~2018-11-28  9:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 11:07 [Qemu-devel] [PATCH v2] bt: use size_t type for length parameters instead of int P J P
2018-11-28  7:06 ` P J P
2018-11-28  8:53 ` Thomas Huth
2018-11-28  9:05   ` Laurent Vivier [this message]
2019-01-28  9:31 ` Hugo Lefeuvre
2019-01-28 11:50   ` Philippe Mathieu-Daudé
2019-01-29 13:13     ` Hugo Lefeuvre

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=5f55f7a6-1ec6-dfec-145d-b1cdeab2049f@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=pjp@fedoraproject.org \
    --cc=ppandit@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=tohidi.arash@gmail.com \
    /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).