public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: Hou Qiming <hqm03ster@gmail.com>
Cc: valerij zaporogeci <vlrzprgts@gmail.com>,
	discuss@edk2.groups.io, Gerd Hoffmann <kraxel@redhat.com>,
	"Marcel Apfelbaum (GMail address)" <marcel.apfelbaum@gmail.com>,
	edk2-devel-groups-io <devel@edk2.groups.io>,
	qemu devel list <qemu-devel@nongnu.org>
Subject: Re: [edk2-discuss] Load Option passing. Either bugs or my confusion.
Date: Mon, 20 Apr 2020 11:32:46 +0200	[thread overview]
Message-ID: <31c4bd9a-080e-9e15-82db-606d12e68349@redhat.com> (raw)
In-Reply-To: <CABSdmrk2L8L-J-JmKQC-kyswOq9Bh3AUnM_+FkiHpW9c1EuxwQ@mail.gmail.com>

On 04/17/20 05:22, Hou Qiming wrote:
> I'm glad we can reach a consensus that ramfb needs sanity checks. And well,
> I'm probably at fault with the hijacking.
> 
> Your QEMU/TCG in QEMU/TCG example also made me realize a deeper problem,
> though: your setting still can't escape the host display / physical GPU
> issue. The middle display layers be bochs or whatever, but as long as the
> framebuffer content and resolution values are propagated, and the end
> result is displayed at all on the host, the host GPU attack surface remains
> exposed to the L2 guest, and checks are needed. Everything shown on the
> screen involves the display driver - GPU stack, GTK or SDL or tty, you
> can't avoid that. ramfb-kvmgt just happened to be the shortest pipeline
> where every stage neglected the checks, which exposed this problem.

Good point.

> Blaming
> this on ramfb is unfair since in your scenario the checks are better done
> in the display subsystems.
> 
> TL;DR You made me realize right now, it's a very real risk that an AARCH64
> Windows guest could exploit a x64 host's display driver by specifying a
> crafted framebuffer with overflowing resolution. I don't want to break it,
> but I'd prefer a broken state over an insecure state.
> 
> I'm not quite sure what this thread is. But I think with the scope this
> discussion is going, maybe it's more of a bug than a regression.

All display devices (frontends) emulated by QEMU have to set bounds for
the permissible resolutions, for the guest. And those limits must never
break the capabilities of the display backends. So this is not a new
problem. How is it handled with other frontends? Like bochs-display, for
example -- I assume bochs-display too is purely virtual, i.e. the
resolution is fully controller (between bounds) by the guest. How is the
guest currently prevented from setting a bochs-display resolution that
"breaks SDL" (whatever that means)?

I'm inclined to agree that we're just seeing two sides of the same bug
-- the first state was too lax, and the current state is too strict.

Thanks
Laszlo


  reply	other threads:[~2020-04-20  9:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <18709.1586743215734342129@groups.io>
     [not found] ` <11181.1586825080096843656@groups.io>
2020-04-14 14:26   ` [edk2-discuss] Load Option passing. Either bugs or my confusion Laszlo Ersek
     [not found]     ` <5211.1586899245384995995@groups.io>
2020-04-15 15:05       ` Laszlo Ersek
2020-04-16  4:38         ` Hou Qiming
2020-04-16 14:12           ` Laszlo Ersek
2020-04-17  3:22             ` Hou Qiming
2020-04-20  9:32               ` Laszlo Ersek [this message]
2020-04-20 14:19           ` Gerd Hoffmann
2020-04-20 14:13         ` Gerd Hoffmann
2020-04-21 13:02           ` Laszlo Ersek
2020-04-22  7:42             ` Hou Qiming
2020-04-22 16:05               ` Laszlo Ersek
2020-04-23  3:15                 ` Hou Qiming

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-list 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=31c4bd9a-080e-9e15-82db-606d12e68349@redhat.com \
    --to=devel@edk2.groups.io \
    /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