From: Li Qiang <liq3ea@gmail.com>
To: qemu-devel@nongnu.org, kraxel@redhat.com
Cc: liqiang6-s@360.cn, ppandit@redhat.com, Li Qiang <liq3ea@gmail.com>
Subject: [Qemu-devel] [PATCH] usb: xhci: fix info leak when writing event to the guest
Date: Tue, 13 Jun 2017 20:39:04 -0700 [thread overview]
Message-ID: <1497411544-80213-1-git-send-email-liqiang6-s@360.cn> (raw)
From: Li Qiang <liq3ea@gmail.com>
In 'xhci_write_event' function, the 'ev_trb' is not full initialized.
This will lead an info leak issue. This patch avoid this.
Signed-off-by: Li Qiang <liq3ea@gmail.com>
---
hw/usb/hcd-xhci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index a0c7960..537997e 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -646,6 +646,7 @@ static void xhci_write_event(XHCIState *xhci, XHCIEvent *event, int v)
XHCITRB ev_trb;
dma_addr_t addr;
+ memset(&ev_trb, 0, sizeof(ev_trb));
ev_trb.parameter = cpu_to_le64(event->ptr);
ev_trb.status = cpu_to_le32(event->length | (event->ccode << 24));
ev_trb.control = (event->slotid << 24) | (event->epid << 16) |
--
2.7.4
next reply other threads:[~2017-06-14 3:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 3:39 Li Qiang [this message]
2017-06-14 3:47 ` [Qemu-devel] [PATCH] usb: xhci: fix info leak when writing event to the guest no-reply
2017-06-14 4:20 ` Li Qiang
2017-06-14 6:23 ` Gerd Hoffmann
2017-06-14 11:16 ` Juan Quintela
2017-06-14 6:30 ` Gerd Hoffmann
2017-06-14 6:36 ` Li Qiang
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=1497411544-80213-1-git-send-email-liqiang6-s@360.cn \
--to=liq3ea@gmail.com \
--cc=kraxel@redhat.com \
--cc=liqiang6-s@360.cn \
--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 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).