From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Daniele Buono <dbuono@linux.vnet.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] meson: Stop if cfi is enabled with system slirp
Date: Thu, 4 Mar 2021 10:37:03 +0000 [thread overview]
Message-ID: <YEC4Rk/eAStVIFU7@redhat.com> (raw)
In-Reply-To: <20210304025939.9164-1-dbuono@linux.vnet.ibm.com>
On Wed, Mar 03, 2021 at 09:59:38PM -0500, Daniele Buono wrote:
> For CFI, we need to compile slirp as a static library together with qemu.
> This is because we register slirp functions as callbacks for QEMU Timers.
> When using a system-wide shared libslirp, the type information for the
> callback is missing and the timer call produces a false positive with CFI.
Is there work being done, or at least an active plan, for fixing this ?
Distros generally won't want to static link slirp to QEMU when there is
a shared slirp available. It increases the security burden to maintain
slirp twice, especially as slirp has a history of CVEs.
IOW, the inability to use shared slirp may well prevent CFI from being
used in distros.
>
> With this patch, meson will stop if CFI is enabled with system-wide slirp
>
> Signed-off-by: Daniele Buono <dbuono@linux.vnet.ibm.com>
> ---
> meson.build | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/meson.build b/meson.build
> index f3db83e974..e1ec5020ac 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1569,6 +1569,18 @@ if have_system
> endif
> endif
>
> +# For CFI, we need to compile slirp as a static library together with qemu.
> +# This is because we register slirp functions as callbacks for QEMU Timers.
> +# When using a system-wide shared libslirp, the type information for the
> +# callback is missing and the timer call produces a false positive with CFI.
> +#
> +# Now that slirp_opt has been defined, check if the selected slirp is compatible
> +# with control-flow integrity.
> +if get_option('cfi') and slirp_opt == 'system'
> + error('Control-Flow Integrity is not compatible with system-wide slirp.' \
> + + ' Please configure with --enable-slirp=git')
> +endif
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2021-03-04 10:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 2:59 [PATCH] meson: Stop if cfi is enabled with system slirp Daniele Buono
2021-03-04 10:37 ` Daniel P. Berrangé [this message]
2021-03-04 10:56 ` Paolo Bonzini
2021-03-05 16:52 ` Daniele Buono
2021-03-05 17:18 ` Paolo Bonzini
2021-03-08 15:05 ` Daniele Buono
2021-03-05 16:53 ` Daniele Buono
2021-03-08 11:19 ` Daniel P. Berrangé
2021-03-08 11:27 ` Paolo Bonzini
2021-03-08 14:58 ` Daniele Buono
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=YEC4Rk/eAStVIFU7@redhat.com \
--to=berrange@redhat.com \
--cc=dbuono@linux.vnet.ibm.com \
--cc=pbonzini@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).