* [Qemu-devel] [PULL 0/1] cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620)
@ 2017-02-22 12:42 Gerd Hoffmann
2017-02-22 12:42 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
2017-02-24 12:48 ` [Qemu-devel] [PULL 0/1] " Peter Maydell
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2017-02-22 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
Here is the pull request for the cirrus cve
fix sent to the list yesterday.
please pull,
Gerd
The following changes since commit 796b288f7be875045670f963ce99991b3c8e96ac:
Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2017-02-21 15:48:22 +0000)
are available in the git repository at:
git://git.kraxel.org/qemu tags/pull-cve-2017-2620-20170222-1
for you to fetch changes up to c4cf7039465b0578035c4ec82f9f2519f7dceaf3:
cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620) (2017-02-22 12:57:08 +0100)
----------------------------------------------------------------
cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620)
----------------------------------------------------------------
Gerd Hoffmann (1):
cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620)
hw/display/cirrus_vga.c | 8 ++++++++
1 file changed, 8 insertions(+)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PULL 1/1] cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620)
2017-02-22 12:42 [Qemu-devel] [PULL 0/1] cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620) Gerd Hoffmann
@ 2017-02-22 12:42 ` Gerd Hoffmann
2017-02-24 12:48 ` [Qemu-devel] [PULL 0/1] " Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2017-02-22 12:42 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
CIRRUS_BLTMODE_MEMSYSSRC blits do NOT check blit destination
and blit width, at all. Oops. Fix it.
Security impact: high.
The missing blit destination check allows to write to host memory.
Basically same as CVE-2014-8106 for the other blit variants.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1487679663-3264-1-git-send-email-kraxel@redhat.com
---
hw/display/cirrus_vga.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index 1deb520..b9e7cb1 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -900,6 +900,10 @@ static int cirrus_bitblt_cputovideo(CirrusVGAState * s)
{
int w;
+ if (blit_is_unsafe(s, true)) {
+ return 0;
+ }
+
s->cirrus_blt_mode &= ~CIRRUS_BLTMODE_MEMSYSSRC;
s->cirrus_srcptr = &s->cirrus_bltbuf[0];
s->cirrus_srcptr_end = &s->cirrus_bltbuf[0];
@@ -925,6 +929,10 @@ static int cirrus_bitblt_cputovideo(CirrusVGAState * s)
}
s->cirrus_srccounter = s->cirrus_blt_srcpitch * s->cirrus_blt_height;
}
+
+ /* the blit_is_unsafe call above should catch this */
+ assert(s->cirrus_blt_srcpitch <= CIRRUS_BLTBUFSIZE);
+
s->cirrus_srcptr = s->cirrus_bltbuf;
s->cirrus_srcptr_end = s->cirrus_bltbuf + s->cirrus_blt_srcpitch;
cirrus_update_memory_access(s);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PULL 0/1] cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620)
2017-02-22 12:42 [Qemu-devel] [PULL 0/1] cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620) Gerd Hoffmann
2017-02-22 12:42 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
@ 2017-02-24 12:48 ` Peter Maydell
1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2017-02-24 12:48 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: QEMU Developers
On 22 February 2017 at 12:42, Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> Here is the pull request for the cirrus cve
> fix sent to the list yesterday.
>
> please pull,
> Gerd
>
> The following changes since commit 796b288f7be875045670f963ce99991b3c8e96ac:
>
> Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging (2017-02-21 15:48:22 +0000)
>
> are available in the git repository at:
>
>
> git://git.kraxel.org/qemu tags/pull-cve-2017-2620-20170222-1
>
> for you to fetch changes up to c4cf7039465b0578035c4ec82f9f2519f7dceaf3:
>
> cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620) (2017-02-22 12:57:08 +0100)
>
> ----------------------------------------------------------------
> cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620)
>
> ----------------------------------------------------------------
> Gerd Hoffmann (1):
> cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620)
>
> hw/display/cirrus_vga.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
Shouldn't the commit have a Cc: qemu-stable@nongnu.org tag?
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-24 12:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-22 12:42 [Qemu-devel] [PULL 0/1] cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo (CVE-2017-2620) Gerd Hoffmann
2017-02-22 12:42 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
2017-02-24 12:48 ` [Qemu-devel] [PULL 0/1] " Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.