qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] usb-host: add range checks for usb-host parameters
@ 2014-06-13 11:35 Gerd Hoffmann
  2014-06-13 11:35 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
  2014-06-13 18:04 ` [Qemu-devel] [PULL 0/1] " Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2014-06-13 11:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

usb patch queue is pretty short too, with a
single patch adding ubs-host parameter checks.

please pull,
  Gerd

The following changes since commit 2a2c4830c0068d70443f3dddc4cc668f0c601b5c:

  Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20140611-1' into staging (2014-06-12 09:51:41 +0100)

are available in the git repository at:


  git://git.kraxel.org/qemu tags/pull-usb-20140613-1

for you to fetch changes up to f3cda6e060c483dee1fa497699fd5f972e5031da:

  usb-host: add range checks for usb-host parameters (2014-06-13 12:34:57 +0200)

----------------------------------------------------------------
usb-host: add range checks for usb-host parameters

----------------------------------------------------------------
Gerd Hoffmann (1):
      usb-host: add range checks for usb-host parameters

 hw/usb/host-libusb.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 1/1] usb-host: add range checks for usb-host parameters
  2014-06-13 11:35 [Qemu-devel] [PULL 0/1] usb-host: add range checks for usb-host parameters Gerd Hoffmann
@ 2014-06-13 11:35 ` Gerd Hoffmann
  2014-06-13 18:04 ` [Qemu-devel] [PULL 0/1] " Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2014-06-13 11:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/host-libusb.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index afbf156..33b5b9f 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -952,6 +952,19 @@ static int usb_host_initfn(USBDevice *udev)
 {
     USBHostDevice *s = USB_HOST_DEVICE(udev);
 
+    if (s->match.vendor_id > 0xffff) {
+        error_report("vendorid out of range");
+        return -1;
+    }
+    if (s->match.product_id > 0xffff) {
+        error_report("productid out of range");
+        return -1;
+    }
+    if (s->match.addr > 127) {
+        error_report("hostaddr out of range");
+        return -1;
+    }
+
     loglevel = s->loglevel;
     udev->flags |= (1 << USB_DEV_FLAG_IS_HOST);
     udev->auto_attach = 0;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/1] usb-host: add range checks for usb-host parameters
  2014-06-13 11:35 [Qemu-devel] [PULL 0/1] usb-host: add range checks for usb-host parameters Gerd Hoffmann
  2014-06-13 11:35 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
@ 2014-06-13 18:04 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2014-06-13 18:04 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 13 June 2014 12:35, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> usb patch queue is pretty short too, with a
> single patch adding ubs-host parameter checks.
>
> please pull,
>   Gerd
>
> The following changes since commit 2a2c4830c0068d70443f3dddc4cc668f0c601b5c:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20140611-1' into staging (2014-06-12 09:51:41 +0100)
>
> are available in the git repository at:
>
>
>   git://git.kraxel.org/qemu tags/pull-usb-20140613-1
>
> for you to fetch changes up to f3cda6e060c483dee1fa497699fd5f972e5031da:
>
>   usb-host: add range checks for usb-host parameters (2014-06-13 12:34:57 +0200)
>
> ----------------------------------------------------------------
> usb-host: add range checks for usb-host parameters
>
> ----------------------------------------------------------------
> Gerd Hoffmann (1):
>       usb-host: add range checks for usb-host parameters
>
>  hw/usb/host-libusb.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-13 18:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 11:35 [Qemu-devel] [PULL 0/1] usb-host: add range checks for usb-host parameters Gerd Hoffmann
2014-06-13 11:35 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
2014-06-13 18:04 ` [Qemu-devel] [PULL 0/1] " Peter Maydell

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).