All of lore.kernel.org
 help / color / mirror / Atom feed
* System emulator security boundary policy now enforceable
@ 2026-11-17 10:09 Daniel P. Berrangé
  2026-11-17 10:24 ` Peter Maydell
  2026-11-17 10:32 ` Mark Cave-Ayland
  0 siblings, 2 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-11-17 10:09 UTC (permalink / raw)
  To: qemu-devel

With the latest pull request of mine that is merged, we now have
the mechanism for enforcement of the QEMU security boundary policy
with annotations completed across QOM classes for machine types,
devices and accelerators.

For a bug disclosure affecting a system emulator to be accepted
as a security flaw the reproducer scenario must now pass without
warnings when adding the '-compat insecure-input' flag.

For example:

 $ qemu-system-x86_64 -compat insecure-input=warn
 qemu-system-x86_64: warning: Insecure QOM type tcg-accel accepted by policy

 $ qemu-system-x86_64 -compat insecure-input=warn -machine isapc -device ne2k_isa
 qemu-system-x86_64: warning: Insecure QOM type isapc-machine accepted by policy
 qemu-system-x86_64: warning: Insecure QOM type tcg-accel accepted by policy
 qemu-system-x86_64: -device ne2k_isa: warning: Insecure QOM type ne2k_isa accepted by policy

Alternatively you can have QEMU crash on the first violation

 $ qemu-system-x86_64 -compat insecure-input=reject -machine isapc -device ne2k_isa
 qemu-system-x86_64: Insecure QOM type isapc-machine disabled by policy
 This type does does not provide a security boundary to protect against untrusted data or actions


When triaging an incoming disclosure affecting system emulators
please use this mechanism as the primary guide for whether to
handle it as a security flaw with a CVE assignment request, or
merely a normal public bug.

This mechanism is intended as authoritative, while the security.rst
docs describing virtualization vs non-virtualization use cases are
merely a high level approximation.

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



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

* Re: System emulator security boundary policy now enforceable
  2026-11-17 10:09 System emulator security boundary policy now enforceable Daniel P. Berrangé
@ 2026-11-17 10:24 ` Peter Maydell
  2026-11-17 10:35   ` Daniel P. Berrangé
  2026-11-17 10:32 ` Mark Cave-Ayland
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2026-11-17 10:24 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: qemu-devel

On Tue, 17 Nov 2026 at 10:10, Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> With the latest pull request of mine that is merged, we now have
> the mechanism for enforcement of the QEMU security boundary policy
> with annotations completed across QOM classes for machine types,
> devices and accelerators.
>
> For a bug disclosure affecting a system emulator to be accepted
> as a security flaw the reproducer scenario must now pass without
> warnings when adding the '-compat insecure-input' flag.

How does the marking work? I'm confused about what's going
on with the pl011 UART (which is on the security boundary
because the arm virt board uses it). Unlike hw/char/serial.c
and some others, there's no ".secure = true" in hw/char/pl011.c.
But it isn't being rejected by
./build/kvmonly/qemu-system-aarch64 -accel kvm -M virt -display none
-compat insecure-input=reject -serial stdio

so presumably we have figured out it's secure somehow. What's
the mechanism here?

Speaking of pl011, there's also a rust implementation (which
I am not using in this test). Do we mark both the C and Rust
implementations as 'secure' ?

thanks
-- PMM


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

* Re: System emulator security boundary policy now enforceable
  2026-11-17 10:09 System emulator security boundary policy now enforceable Daniel P. Berrangé
  2026-11-17 10:24 ` Peter Maydell
@ 2026-11-17 10:32 ` Mark Cave-Ayland
  2026-11-17 16:00   ` Daniel P. Berrangé
  1 sibling, 1 reply; 7+ messages in thread
From: Mark Cave-Ayland @ 2026-11-17 10:32 UTC (permalink / raw)
  To: Daniel P. Berrangé, qemu-devel

On 17/11/2026 10:09, Daniel P. Berrangé wrote:

> With the latest pull request of mine that is merged, we now have
> the mechanism for enforcement of the QEMU security boundary policy
> with annotations completed across QOM classes for machine types,
> devices and accelerators.
> 
> For a bug disclosure affecting a system emulator to be accepted
> as a security flaw the reproducer scenario must now pass without
> warnings when adding the '-compat insecure-input' flag.
> 
> For example:
> 
>   $ qemu-system-x86_64 -compat insecure-input=warn
>   qemu-system-x86_64: warning: Insecure QOM type tcg-accel accepted by policy
> 
>   $ qemu-system-x86_64 -compat insecure-input=warn -machine isapc -device ne2k_isa
>   qemu-system-x86_64: warning: Insecure QOM type isapc-machine accepted by policy
>   qemu-system-x86_64: warning: Insecure QOM type tcg-accel accepted by policy
>   qemu-system-x86_64: -device ne2k_isa: warning: Insecure QOM type ne2k_isa accepted by policy
> 
> Alternatively you can have QEMU crash on the first violation
> 
>   $ qemu-system-x86_64 -compat insecure-input=reject -machine isapc -device ne2k_isa
>   qemu-system-x86_64: Insecure QOM type isapc-machine disabled by policy
>   This type does does not provide a security boundary to protect against untrusted data or actions
> 
> 
> When triaging an incoming disclosure affecting system emulators
> please use this mechanism as the primary guide for whether to
> handle it as a security flaw with a CVE assignment request, or
> merely a normal public bug.
> 
> This mechanism is intended as authoritative, while the security.rst
> docs describing virtualization vs non-virtualization use cases are
> merely a high level approximation.
Hurray! What is the best way to update AGENTS.md and friends accordingly 
to take advantage of this? Presumably we at least need to tell the agent 
that only reproducers within the security boundary should be considered 
"Confidential".

Unfortunately I'm not sure we can go as far as telling the agent not to 
raise a GitLab issue unless it lies within the security boundary, 
otherwise we risk still missing some useful bug reports. So the 
onslaught continues...


ATB,

Mark.



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

* Re: System emulator security boundary policy now enforceable
  2026-11-17 10:24 ` Peter Maydell
@ 2026-11-17 10:35   ` Daniel P. Berrangé
  2026-11-17 14:55     ` Marc-André Lureau
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-11-17 10:35 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

On Tue, Nov 17, 2026 at 10:24:26AM +0000, Peter Maydell wrote:
> On Tue, 17 Nov 2026 at 10:10, Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > With the latest pull request of mine that is merged, we now have
> > the mechanism for enforcement of the QEMU security boundary policy
> > with annotations completed across QOM classes for machine types,
> > devices and accelerators.
> >
> > For a bug disclosure affecting a system emulator to be accepted
> > as a security flaw the reproducer scenario must now pass without
> > warnings when adding the '-compat insecure-input' flag.
> 
> How does the marking work? I'm confused about what's going
> on with the pl011 UART (which is on the security boundary
> because the arm virt board uses it). Unlike hw/char/serial.c
> and some others, there's no ".secure = true" in hw/char/pl011.c.
> But it isn't being rejected by
> ./build/kvmonly/qemu-system-aarch64 -accel kvm -M virt -display none
> -compat insecure-input=reject -serial stdio
> 
> so presumably we have figured out it's secure somehow. What's
> the mechanism here?

Currently we've only marked things which are explicitly user
creatable. ie they appear in '-machine help', '-accel help'
or '-device help' lists.

If a machine type is marked as secure, then implicitly devices
which are built-in for that machine are also considered secure.
Similarly if a device is marked as secure, then implicitly
any QOM parents of that device are also secure.

In the next release cycle, I want to explicitly mark the
built-in devices to make this clear to developers, and also
explicitly mark parent types.

Then code can explicitly validate the built-in devices & parents,
so that we can detect if someone adds something inappropriate
in our security boundary without realizing implications.

> Speaking of pl011, there's also a rust implementation (which
> I am not using in this test). Do we mark both the C and Rust
> implementations as 'secure' ?

We still have Rust disabled by default. Did we ever declare it to
be production ready yet ? If we still consider it experimental then
the rust pl011 would be out of scope.

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



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

* Re: System emulator security boundary policy now enforceable
  2026-11-17 10:35   ` Daniel P. Berrangé
@ 2026-11-17 14:55     ` Marc-André Lureau
  2026-11-17 14:57       ` Daniel P. Berrangé
  0 siblings, 1 reply; 7+ messages in thread
From: Marc-André Lureau @ 2026-11-17 14:55 UTC (permalink / raw)
  To: Daniel P. Berrangé; +Cc: Peter Maydell, qemu-devel

Hi

On Tue, Nov 17, 2026 at 2:36 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
>
> On Tue, Nov 17, 2026 at 10:24:26AM +0000, Peter Maydell wrote:
> > On Tue, 17 Nov 2026 at 10:10, Daniel P. Berrangé <berrange@redhat.com> wrote:
> > >
> > > With the latest pull request of mine that is merged, we now have
> > > the mechanism for enforcement of the QEMU security boundary policy
> > > with annotations completed across QOM classes for machine types,
> > > devices and accelerators.
> > >
> > > For a bug disclosure affecting a system emulator to be accepted
> > > as a security flaw the reproducer scenario must now pass without
> > > warnings when adding the '-compat insecure-input' flag.
> >
> > How does the marking work? I'm confused about what's going
> > on with the pl011 UART (which is on the security boundary
> > because the arm virt board uses it). Unlike hw/char/serial.c
> > and some others, there's no ".secure = true" in hw/char/pl011.c.
> > But it isn't being rejected by
> > ./build/kvmonly/qemu-system-aarch64 -accel kvm -M virt -display none
> > -compat insecure-input=reject -serial stdio
> >
> > so presumably we have figured out it's secure somehow. What's
> > the mechanism here?
>
> Currently we've only marked things which are explicitly user
> creatable. ie they appear in '-machine help', '-accel help'
> or '-device help' lists.
>
> If a machine type is marked as secure, then implicitly devices
> which are built-in for that machine are also considered secure.
> Similarly if a device is marked as secure, then implicitly
> any QOM parents of that device are also secure.
>
> In the next release cycle, I want to explicitly mark the
> built-in devices to make this clear to developers, and also
> explicitly mark parent types.
>
> Then code can explicitly validate the built-in devices & parents,
> so that we can detect if someone adds something inappropriate
> in our security boundary without realizing implications.

We also need to cover devices created via -vga, -nic, -usbdevice, -audio

I am not sure how to approach this though. Should we make all the
object_new() path faillible? Or use a top-down solution?

I'd favour the bottom-up approach so we can properly check all objects
instantiations and fix as needed

>
> > Speaking of pl011, there's also a rust implementation (which
> > I am not using in this test). Do we mark both the C and Rust
> > implementations as 'secure' ?
>
> We still have Rust disabled by default. Did we ever declare it to
> be production ready yet ? If we still consider it experimental then
> the rust pl011 would be out of scope.
>
> With regards,
> Daniel
> --
> |: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
> |: https://libvirt.org          ~~          https://entangle-photo.org :|
> |: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
>
>


-- 
Marc-André Lureau


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

* Re: System emulator security boundary policy now enforceable
  2026-11-17 14:55     ` Marc-André Lureau
@ 2026-11-17 14:57       ` Daniel P. Berrangé
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-11-17 14:57 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: Peter Maydell, qemu-devel

On Tue, Nov 17, 2026 at 06:55:17PM +0400, Marc-André Lureau wrote:
> Hi
> 
> On Tue, Nov 17, 2026 at 2:36 PM Daniel P. Berrangé <berrange@redhat.com> wrote:
> >
> > On Tue, Nov 17, 2026 at 10:24:26AM +0000, Peter Maydell wrote:
> > > On Tue, 17 Nov 2026 at 10:10, Daniel P. Berrangé <berrange@redhat.com> wrote:
> > > >
> > > > With the latest pull request of mine that is merged, we now have
> > > > the mechanism for enforcement of the QEMU security boundary policy
> > > > with annotations completed across QOM classes for machine types,
> > > > devices and accelerators.
> > > >
> > > > For a bug disclosure affecting a system emulator to be accepted
> > > > as a security flaw the reproducer scenario must now pass without
> > > > warnings when adding the '-compat insecure-input' flag.
> > >
> > > How does the marking work? I'm confused about what's going
> > > on with the pl011 UART (which is on the security boundary
> > > because the arm virt board uses it). Unlike hw/char/serial.c
> > > and some others, there's no ".secure = true" in hw/char/pl011.c.
> > > But it isn't being rejected by
> > > ./build/kvmonly/qemu-system-aarch64 -accel kvm -M virt -display none
> > > -compat insecure-input=reject -serial stdio
> > >
> > > so presumably we have figured out it's secure somehow. What's
> > > the mechanism here?
> >
> > Currently we've only marked things which are explicitly user
> > creatable. ie they appear in '-machine help', '-accel help'
> > or '-device help' lists.
> >
> > If a machine type is marked as secure, then implicitly devices
> > which are built-in for that machine are also considered secure.
> > Similarly if a device is marked as secure, then implicitly
> > any QOM parents of that device are also secure.
> >
> > In the next release cycle, I want to explicitly mark the
> > built-in devices to make this clear to developers, and also
> > explicitly mark parent types.
> >
> > Then code can explicitly validate the built-in devices & parents,
> > so that we can detect if someone adds something inappropriate
> > in our security boundary without realizing implications.
> 
> We also need to cover devices created via -vga, -nic, -usbdevice, -audio
> 
> I am not sure how to approach this though. Should we make all the
> object_new() path faillible? Or use a top-down solution?
> 
> I'd favour the bottom-up approach so we can properly check all objects
> instantiations and fix as needed

Once we get all parents marked, and all machine type built-in device
marked, then we can move the check into the Device 'realize' path
and catch everything.


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



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

* Re: System emulator security boundary policy now enforceable
  2026-11-17 10:32 ` Mark Cave-Ayland
@ 2026-11-17 16:00   ` Daniel P. Berrangé
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-11-17 16:00 UTC (permalink / raw)
  To: Mark Cave-Ayland; +Cc: qemu-devel

On Tue, Nov 17, 2026 at 10:32:51AM +0000, Mark Cave-Ayland wrote:
> On 17/11/2026 10:09, Daniel P. Berrangé wrote:
> 
> > With the latest pull request of mine that is merged, we now have
> > the mechanism for enforcement of the QEMU security boundary policy
> > with annotations completed across QOM classes for machine types,
> > devices and accelerators.
> > 
> > For a bug disclosure affecting a system emulator to be accepted
> > as a security flaw the reproducer scenario must now pass without
> > warnings when adding the '-compat insecure-input' flag.
> > 
> > For example:
> > 
> >   $ qemu-system-x86_64 -compat insecure-input=warn
> >   qemu-system-x86_64: warning: Insecure QOM type tcg-accel accepted by policy
> > 
> >   $ qemu-system-x86_64 -compat insecure-input=warn -machine isapc -device ne2k_isa
> >   qemu-system-x86_64: warning: Insecure QOM type isapc-machine accepted by policy
> >   qemu-system-x86_64: warning: Insecure QOM type tcg-accel accepted by policy
> >   qemu-system-x86_64: -device ne2k_isa: warning: Insecure QOM type ne2k_isa accepted by policy
> > 
> > Alternatively you can have QEMU crash on the first violation
> > 
> >   $ qemu-system-x86_64 -compat insecure-input=reject -machine isapc -device ne2k_isa
> >   qemu-system-x86_64: Insecure QOM type isapc-machine disabled by policy
> >   This type does does not provide a security boundary to protect against untrusted data or actions
> > 
> > 
> > When triaging an incoming disclosure affecting system emulators
> > please use this mechanism as the primary guide for whether to
> > handle it as a security flaw with a CVE assignment request, or
> > merely a normal public bug.
> > 
> > This mechanism is intended as authoritative, while the security.rst
> > docs describing virtualization vs non-virtualization use cases are
> > merely a high level approximation.
> Hurray! What is the best way to update AGENTS.md and friends accordingly to
> take advantage of this? Presumably we at least need to tell the agent that
> only reproducers within the security boundary should be considered
> "Confidential".
> 
> Unfortunately I'm not sure we can go as far as telling the agent not to
> raise a GitLab issue unless it lies within the security boundary, otherwise
> we risk still missing some useful bug reports. So the onslaught continues...

I guess if we at least tell the agent to use the new arg
"-compat insecure-types=reject" in their reproducers, they'll avoid
creating confidential issues for those non-virt scnearios, and their
comments will hopefully show that they included this arg.

Won't cut down the bug count, but will marginally reduce the triage work
as we won't need to manually turn off confidentiality and explain this
to users over and over and over again.

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



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

end of thread, other threads:[~2026-11-17 16:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 10:09 System emulator security boundary policy now enforceable Daniel P. Berrangé
2026-11-17 10:24 ` Peter Maydell
2026-11-17 10:35   ` Daniel P. Berrangé
2026-11-17 14:55     ` Marc-André Lureau
2026-11-17 14:57       ` Daniel P. Berrangé
2026-11-17 10:32 ` Mark Cave-Ayland
2026-11-17 16:00   ` Daniel P. Berrangé

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.