<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 24, 2018 at 5:59 PM Jamie Strandboge <<a href="mailto:jamie@canonical.com">jamie@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 2018-08-24 at 08:12 +0200, Christian Ehrhardt wrote:<br>
> Due to kernel upstream change 338d0be4 ("apparmor: fix ptrace read<br>
> check")<br>
> libvirt now hits apparmor denies like:<br>
>   apparmor="DENIED" operation="ptrace" profile="/usr/sbin/libvirtd"<br>
>   pid=4409 comm="libvirtd" requested_mask="read" denied_mask="read"<br>
>   peer="libvirt-14e92a75-7668-4b97-8f92-322fc1b9c78a"<br>
> <br>
> Extend the ptrace rule to also allow 'ptrace (read)' for libvirtd to<br>
> work<br>
> with these newer kernels.<br>
> <br>
> Fixes: <a href="https://bugs.launchpad.net/bugs/1788603" rel="noreferrer" target="_blank">https://bugs.launchpad.net/bugs/1788603</a><br>
> <br>
> Reported-by: Thadeu Lima de Souza Cascardo <thadeu.cascardo@canonical<br>
> .com><br>
> Signed-off-by: Christian Ehrhardt <<a href="mailto:christian.ehrhardt@canonical.com" target="_blank">christian.ehrhardt@canonical.com</a>><br>
> ---<br>
>  examples/apparmor/usr.sbin.libvirtd | 8 ++++----<br>
>  1 file changed, 4 insertions(+), 4 deletions(-)<br>
> <br>
> diff --git a/examples/apparmor/usr.sbin.libvirtd<br>
> b/examples/apparmor/usr.sbin.libvirtd<br>
> index 80e348b7ee..f0ffc53008 100644<br>
> --- a/examples/apparmor/usr.sbin.libvirtd<br>
> +++ b/examples/apparmor/usr.sbin.libvirtd<br>
> @@ -50,10 +50,10 @@<br>
>    # for --p2p migrations<br>
>    unix (send, receive) type=stream addr=none peer=(label=unconfined<br>
> addr=none),<br>
>  <br>
> -  ptrace (trace) peer=unconfined,<br>
> -  ptrace (trace) peer=/usr/sbin/libvirtd,<br>
> -  ptrace (trace) peer=/usr/sbin/dnsmasq,<br>
> -  ptrace (trace) peer=libvirt-*,<br>
> +  ptrace (read,trace) peer=unconfined,<br>
> +  ptrace (read,trace) peer=/usr/sbin/libvirtd,<br>
> +  ptrace (read,trace) peer=/usr/sbin/dnsmasq,<br>
> +  ptrace (read,trace) peer=libvirt-*,<br>
<br>
LGTM. +1 to apply<br></blockquote><div> </div><div>Thanks for your Review Erik and Jamie,</div><div>added and pushed to master now.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-- <br>
Jamie Strandboge             | <a href="http://www.canonical.com" rel="noreferrer" target="_blank">http://www.canonical.com</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(136,136,136);font-size:12.8px">Christian Ehrhardt</span><div style="color:rgb(136,136,136);font-size:12.8px">Software Engineer, Ubuntu Server</div><div style="color:rgb(136,136,136);font-size:12.8px">Canonical Ltd</div></div></div></div></div></div>