From nobody Wed May 1 18:00:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=canonical.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1535091153147454.5137688308606; Thu, 23 Aug 2018 23:12:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19E1430832D1; Fri, 24 Aug 2018 06:12:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CC2D510021B2; Fri, 24 Aug 2018 06:12:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E7BE84BB75; Fri, 24 Aug 2018 06:12:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7O6CKLN031683 for ; Fri, 24 Aug 2018 02:12:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id B0F61308BDA1; Fri, 24 Aug 2018 06:12:20 +0000 (UTC) Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A815A308BDA0 for ; Fri, 24 Aug 2018 06:12:17 +0000 (UTC) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 817D83082A33 for ; Fri, 24 Aug 2018 06:12:16 +0000 (UTC) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ft5KR-0006Ze-0C; Fri, 24 Aug 2018 06:12:15 +0000 From: Christian Ehrhardt To: libvir-list@redhat.com, =?UTF-8?q?Guido=20G=C3=BCnther?= , Jamie Strandboge Date: Fri, 24 Aug 2018 08:12:11 +0200 Message-Id: <20180824061211.7301-1-christian.ehrhardt@canonical.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 212 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 24 Aug 2018 06:12:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 24 Aug 2018 06:12:16 +0000 (UTC) for IP:'91.189.89.112' DOMAIN:'youngberry.canonical.com' HELO:'youngberry.canonical.com' FROM:'christian.ehrhardt@canonical.com' RCPT:'' X-RedHat-Spam-Score: -5 (RCVD_IN_DNSWL_HI) 91.189.89.112 youngberry.canonical.com 91.189.89.112 youngberry.canonical.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.45 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: Christian Ehrhardt Subject: [libvirt] [PATCH] apparmor: fix ptrace rules with kernel 4.18 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Fri, 24 Aug 2018 06:12:31 +0000 (UTC) X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Due to kernel upstream change 338d0be4 ("apparmor: fix ptrace read check") libvirt now hits apparmor denies like: apparmor=3D"DENIED" operation=3D"ptrace" profile=3D"/usr/sbin/libvirtd" pid=3D4409 comm=3D"libvirtd" requested_mask=3D"read" denied_mask=3D"read" peer=3D"libvirt-14e92a75-7668-4b97-8f92-322fc1b9c78a" Extend the ptrace rule to also allow 'ptrace (read)' for libvirtd to work with these newer kernels. Fixes: https://bugs.launchpad.net/bugs/1788603 Reported-by: Thadeu Lima de Souza Cascardo Signed-off-by: Christian Ehrhardt Reviewed-by: Erik Skultety --- examples/apparmor/usr.sbin.libvirtd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sb= in.libvirtd index 80e348b7ee..f0ffc53008 100644 --- a/examples/apparmor/usr.sbin.libvirtd +++ b/examples/apparmor/usr.sbin.libvirtd @@ -50,10 +50,10 @@ # for --p2p migrations unix (send, receive) type=3Dstream addr=3Dnone peer=3D(label=3Dunconfine= d addr=3Dnone), =20 - ptrace (trace) peer=3Dunconfined, - ptrace (trace) peer=3D/usr/sbin/libvirtd, - ptrace (trace) peer=3D/usr/sbin/dnsmasq, - ptrace (trace) peer=3Dlibvirt-*, + ptrace (read,trace) peer=3Dunconfined, + ptrace (read,trace) peer=3D/usr/sbin/libvirtd, + ptrace (read,trace) peer=3D/usr/sbin/dnsmasq, + ptrace (read,trace) peer=3Dlibvirt-*, =20 signal (send) peer=3D/usr/sbin/dnsmasq, signal (read, send) peer=3Dlibvirt-*, --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list