qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Thomas Huth <thuth@redhat.com>, P J P <ppandit@redhat.com>,
	Qemu Developers <qemu-devel@nongnu.org>
Cc: "QEMU Trivial" <qemu-trivial@nongnu.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Arash TC" <tohidi.arash@gmail.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <pmathieu@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH v1] bt: use size_t type for length parameters instead of int
Date: Tue, 6 Nov 2018 16:26:13 +0100	[thread overview]
Message-ID: <da6687d1-c6cd-eb7a-263c-f11893bbbd5c@redhat.com> (raw)
In-Reply-To: <1055bb12-6b57-1240-790c-930f2405ebee@redhat.com>

On 06/11/2018 15:52, Thomas Huth wrote:
> On 2018-11-02 10:05, P J P wrote:
>> +-- On Sat, 27 Oct 2018, P J P wrote --+
>> |+-- On Sun, 21 Oct 2018, P J P wrote --+
>> || 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        | 20 +++++++--------
>> ||  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, 90 insertions(+), 87 deletions(-)
>> || 
>> || Update v1: add assert check in vhci_host_send. Also check other places wherein
>> || length is used with fixed size buffers.
>> ||   -> https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg03831.html
>> | 
>> | Ping...!
>>
>> Ping...!
> 
> The bluetooth subsystem is completely unmaintained, so if Paolo does not
> want to pick it up through his "misc" tree, maybe Peter could apply this
> patch directly? Or maybe it could go through the trivial tree since it
> does not look very complicated?
> 
> FWIW, the patch looks OK to me at a first glance, so:
> 
> Acked-by: Thomas Huth <thuth@redhat.com>
> 
> PS: I still think we should deprecate the bt subsystem, since nobody
> really touched it within years...
> 

I can add it to the trivial-patches branch, but I don't plan any pull
request before the 3.1 release in December.

Thanks,
Laurent

  reply	other threads:[~2018-11-06 15:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-21 17:58 [Qemu-devel] [PATCH v1] bt: use size_t type for length parameters instead of int P J P
2018-10-26 19:49 ` P J P
2018-11-02  9:05   ` P J P
2018-11-06 14:52     ` Thomas Huth
2018-11-06 15:26       ` Laurent Vivier [this message]
2018-11-06 18:56       ` Paolo Bonzini
2018-11-06 15:09 ` Philippe Mathieu-Daudé
2018-11-19 11:14   ` P J P

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=da6687d1-c6cd-eb7a-263c-f11893bbbd5c@redhat.com \
    --to=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=pmathieu@redhat.com \
    --cc=ppandit@redhat.com \
    --cc=qemu-devel@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).