From nobody Sun May 5 00:02:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1596555211; cv=none; d=zohomail.com; s=zohoarc; b=GFde88O3pxZLNOp3tPSRnVp0++nOGQRO6LSyygEwDH87KOGJ+Ho41e0LqqVlBdayVn2PNNM99+Ls6I/PpW3Da+fiESwraxJOkTyfm7/y+jIcxMm6NTGFRtZhRlj6ay0EreJANcjB/7Ua97xvdcYdoFgP29SrDrS/GUiXINiR6tw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596555211; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cZwttCDh7EuPSh7OcN0FAp2acXlm+bqzGI3GzJuZlJM=; b=UBryMqySzo/BEOdxecIIIP2Dzwx0oF3do4Urc/65zr9dS7XhcIuuMo1ev/XEH336pCXmISC+KpcWKSkoLIu+qreOGMBlJu38kfeL4uu73r4ZUTNfpbzqa4QIDwo2P9H1MEld8AinabVBwYcYuAmOUqnta1wmYG06BBV4c4EJ5J0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1596555211209305.2238489847165; Tue, 4 Aug 2020 08:33:31 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-287-n11zrrpKPMa9r7gPY_oQGQ-1; Tue, 04 Aug 2020 11:32:49 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7FA4E8015CE; Tue, 4 Aug 2020 15:32:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63A1C5D9CC; Tue, 4 Aug 2020 15:32:42 +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 2EAAD1800B6C; Tue, 4 Aug 2020 15:32:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 074FWOO6020753 for ; Tue, 4 Aug 2020 11:32:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6AC4F110D5A5; Tue, 4 Aug 2020 15:32:24 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 667B9110D5A7 for ; Tue, 4 Aug 2020 15:32:24 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 536038A19B2 for ; Tue, 4 Aug 2020 15:32:24 +0000 (UTC) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-45-tqNQ2Xb7PaKYwexqr68UJQ-1; Tue, 04 Aug 2020 11:32:19 -0400 Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k2yvK-0002BM-38; Tue, 04 Aug 2020 15:32:18 +0000 X-MC-Unique: n11zrrpKPMa9r7gPY_oQGQ-1 X-MC-Unique: tqNQ2Xb7PaKYwexqr68UJQ-1 From: Christian Ehrhardt To: libvir-list@redhat.com Subject: [PATCH v2 1/5] apparmor: allow default pki path Date: Tue, 4 Aug 2020 17:32:10 +0200 Message-Id: <20200804153214.1305009-2-christian.ehrhardt@canonical.com> In-Reply-To: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> References: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Jamie Strandboge , =?UTF-8?q?Guido=20G=C3=BCnther?= , Andrea Bolognani , Christian Ehrhardt , Sam Hartman 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Sam Hartman /etc/pki/qemu is a pki path recommended by qemu tls docs [1] and one that can cause issues with spice connections when missing. Add the path to the allowed list of pki paths to fix the issue. Note: this is active in Debian/Ubuntu [1] for quite a while already. [1]: https://www.qemu.org/docs/master/system/tls.html [2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D930100 Signed-off-by: Christian Ehrhardt Acked-by: Jamie Strandboge --- src/security/apparmor/libvirt-qemu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/lib= virt-qemu index 1a4b226612..2d08d6f7ad 100644 --- a/src/security/apparmor/libvirt-qemu +++ b/src/security/apparmor/libvirt-qemu @@ -94,6 +94,8 @@ /etc/pki/CA/* r, /etc/pki/libvirt{,-spice,-vnc}/ r, /etc/pki/libvirt{,-spice,-vnc}/** r, + /etc/pki/qemu/ r, + /etc/pki/qemu/** r, =20 # the various binaries /usr/bin/kvm rmix, --=20 2.27.0 From nobody Sun May 5 00:02:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1596555197; cv=none; d=zohomail.com; s=zohoarc; b=iSzFq2x39AwvMQl4rPY/jiM0LFPwyZr96q1iM7mr5UIt/PkjGJ3dw+vyfYghmN1VKJiRgl/LuEp+Shn7jR9TYFcBZ8KUhM48/HsOBsAdqyQyXwwHC+lduLlZJ2KQ24FesYvqd+R79bY1lfnJX866Urk2HhiBrAz2CVW1MLTmW1I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596555197; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ttO180WKXFv+5D1NPawOoIThhKxNdPf7g06or8NzR1A=; b=RQR92i1v3NMVj0deL6h8CF08NW9R+6GmZ+dwCn5v9YfJjKpz88BZMYT4JEYS88cjYfKcYMu/3UxOc+/5q1vWHMa/NxqJ8nI+/ZVD6bJOi3Ay6Dqz4pBmr+B8UkMAT+JSxkvN9H0y8gDBefHJkbqcMMAmCbhV0qaluHi1k/YlAEk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1596555197374186.00807807370222; Tue, 4 Aug 2020 08:33:17 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-336-6UQPv31UOS6-FAPG1qRFSQ-1; Tue, 04 Aug 2020 11:32:39 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2987E8015F3; Tue, 4 Aug 2020 15:32:30 +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 CCD175D9CC; Tue, 4 Aug 2020 15:32:29 +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 BA1A99A117; Tue, 4 Aug 2020 15:32:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 074FWOEn020750 for ; Tue, 4 Aug 2020 11:32:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 396DB110D5A0; Tue, 4 Aug 2020 15:32:24 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 17CE5110D5A5 for ; Tue, 4 Aug 2020 15:32:22 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9A1C318A6663 for ; Tue, 4 Aug 2020 15:32:22 +0000 (UTC) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-485-ITbQspjYOkGWxdYI40b1-g-1; Tue, 04 Aug 2020 11:32:19 -0400 Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k2yvK-0002BM-DX; Tue, 04 Aug 2020 15:32:18 +0000 X-MC-Unique: 6UQPv31UOS6-FAPG1qRFSQ-1 X-MC-Unique: ITbQspjYOkGWxdYI40b1-g-1 From: Christian Ehrhardt To: libvir-list@redhat.com Subject: [PATCH v2 2/5] apparmor: allow libvirtd to call pygrub Date: Tue, 4 Aug 2020 17:32:11 +0200 Message-Id: <20200804153214.1305009-3-christian.ehrhardt@canonical.com> In-Reply-To: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> References: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Jamie Strandboge , =?UTF-8?q?Guido=20G=C3=BCnther?= , Andrea Bolognani , Stefan Bader , Christian Ehrhardt 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefan Bader When using xen through libxl in Debian/Ubuntu it needs to be able to call pygrub. This is placed in a versioned path like /usr/lib/xen-4.11/bin. In theory the rule could be more strict by rendering the libexec_dir setting pkg-config can derive from libbxen-dev. But that would make particular libvirt/xen packages version-depend on each other. It seems more reasonable to avoid these versioned dependencies and use a wildcard rule instead as it is already in place for libxl-save-helper. Note: This change was in Debian [1] and Ubuntu [2] for quite some time already. [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D931768 [2]: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1326003 Signed-off-by: Christian Ehrhardt Acked-by: Jamie Strandboge --- src/security/apparmor/usr.sbin.libvirtd.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security/apparmor/usr.sbin.libvirtd.in b/src/security/appa= rmor/usr.sbin.libvirtd.in index 1e137039e9..312fa4b6d1 100644 --- a/src/security/apparmor/usr.sbin.libvirtd.in +++ b/src/security/apparmor/usr.sbin.libvirtd.in @@ -86,6 +86,7 @@ profile libvirtd @sbindir@/libvirtd flags=3D(attach_disco= nnected) { /usr/{lib,lib64}/xen-common/bin/xen-toolstack PUx, /usr/{lib,lib64}/xen/bin/* Ux, /usr/lib/xen-*/bin/libxl-save-helper PUx, + /usr/lib/xen-*/bin/pygrub PUx, /usr/{lib,lib64,lib/qemu,libexec}/vhost-user-gpu PUx, =20 # Required by nwfilter_ebiptables_driver.c:ebiptablesWriteToTempFile() to --=20 2.27.0 From nobody Sun May 5 00:02:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1596555252; cv=none; d=zohomail.com; s=zohoarc; b=KImPHkhDjUoGhxd7NaJH1ttj0UT8MyvHAdNUhRQ6hYn7g1w00wlS9rCex7tJUQzDn1cpjhlonUfRX2Vk4YOBKxApvR1QzLaVWRLy+w0/kwkpDgg5NrWtJJKsNxJzj5DS34GkGViBQite9h5xhHUXhof88OKYaZ+ccxOTHirn2vc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596555252; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=j5ejgFyHXnAEbhjcIDnWaG6Ye9wBIcdFZBoVrasVpQM=; b=h92pxurwtjUXlrBUCTyowqOe2yLImnzwj1GrO6FtSD62AHxIfa3XjPU72mXw8E1W+MhbWszh1xdkXgwoBOKxAzcywzlyz+LFEMO0z5GlOm6dLNGLcKNpIYJvGNlQ9hJ9+vfxXqgx4r40tzrvmsz1EU2btiQXQQJ3BnKib8RShlk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1596555252599916.5728982301454; Tue, 4 Aug 2020 08:34:12 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-153-DkgaBHanPCePfGnxajO9Rg-1; Tue, 04 Aug 2020 11:32:35 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6BBD591272; Tue, 4 Aug 2020 15:32:30 +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 C54277852C; Tue, 4 Aug 2020 15:32:29 +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 DE4024EDB7; Tue, 4 Aug 2020 15:32:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 074FWOUW020751 for ; Tue, 4 Aug 2020 11:32:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3EB39110D5A3; Tue, 4 Aug 2020 15:32:24 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 37B5C110D5AB for ; Tue, 4 Aug 2020 15:32:24 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 175748A19B2 for ; Tue, 4 Aug 2020 15:32:24 +0000 (UTC) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-223-L2ls0Ft3PP2W7M1y2pYJYA-1; Tue, 04 Aug 2020 11:32:19 -0400 Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k2yvK-0002BM-Nn; Tue, 04 Aug 2020 15:32:18 +0000 X-MC-Unique: DkgaBHanPCePfGnxajO9Rg-1 X-MC-Unique: L2ls0Ft3PP2W7M1y2pYJYA-1 From: Christian Ehrhardt To: libvir-list@redhat.com Subject: [PATCH v2 3/5] apparmor: read only access to overcommit_memory Date: Tue, 4 Aug 2020 17:32:12 +0200 Message-Id: <20200804153214.1305009-4-christian.ehrhardt@canonical.com> In-Reply-To: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> References: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: Stefan Bader , =?UTF-8?q?Guido=20G=C3=BCnther?= , Jamie Strandboge , Andrea Bolognani , Christian Ehrhardt 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jamie Strandboge Allow qemu to read @{PROC}/sys/vm/overcommit_memory. This is read on guest start-up and (as read-only) not a critical secret that has to stay hidden. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader Signed-off-by: Jamie Strandboge --- src/security/apparmor/libvirt-qemu | 1 + 1 file changed, 1 insertion(+) diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/lib= virt-qemu index 2d08d6f7ad..b132cf0226 100644 --- a/src/security/apparmor/libvirt-qemu +++ b/src/security/apparmor/libvirt-qemu @@ -32,6 +32,7 @@ # only modify its comm value or those in its thread group. owner @{PROC}/@{pid}/task/@{tid}/comm rw, @{PROC}/sys/kernel/cap_last_cap r, + @{PROC}/sys/vm/overcommit_memory r, =20 # For hostdev access. The actual devices will be added dynamically /sys/bus/usb/devices/ r, --=20 2.27.0 From nobody Sun May 5 00:02:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1596555214; cv=none; d=zohomail.com; s=zohoarc; b=SvJXQHr0p7FK2MFYhppFlYIa30v4b+Pi6ETYcWmjOHFmpGX5dc5hRVTaGbq3kgpRIdFY05KxlYtl4cLa5b9ymIC4OBcD+xHFCqf0FDSTu/B2J/x+VqLnH3BXFag2PE5z7+YpTwZYVxi2AuauquELuqHhnUzY9GBcAgHIK4HVpYE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596555214; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6sf6nxGgI2wVxgwXmAK/EyvlbjAtxJL1UdpNgN+m0gM=; b=aOceSg1xnf8J2083WsmPUXrSET1uQ7fAbl12CLKNVPMl4BQ+dWgFDzvyDVnHlnaydafNyKHZdqVgIPi6PsHUHU60dcUf0hd6Kw0ekqRjnW/fBIrtcGm91v5rIByh07a7wgkBfOejtKfsPSDebDfrkKYd8JuK7mgJdnTtcZZ8qoM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1596555214379653.8860817145295; Tue, 4 Aug 2020 08:33:34 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-143-ZUoqyv3kPQCTrYRXTT18dg-1; Tue, 04 Aug 2020 11:32:50 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E4EF49127F; Tue, 4 Aug 2020 15:32:44 +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 C72E371771; Tue, 4 Aug 2020 15:32:44 +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 964DF97382; Tue, 4 Aug 2020 15:32:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 074FWUfK020805 for ; Tue, 4 Aug 2020 11:32:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id ADDBEED174; Tue, 4 Aug 2020 15:32:30 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A752CEB35C for ; Tue, 4 Aug 2020 15:32:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2FDF8800050 for ; Tue, 4 Aug 2020 15:32:28 +0000 (UTC) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-51-GKI8ZtyEMe2LH4FE-fko4Q-1; Tue, 04 Aug 2020 11:32:20 -0400 Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k2yvL-0002BM-2A; Tue, 04 Aug 2020 15:32:19 +0000 X-MC-Unique: ZUoqyv3kPQCTrYRXTT18dg-1 X-MC-Unique: GKI8ZtyEMe2LH4FE-fko4Q-1 From: Christian Ehrhardt To: libvir-list@redhat.com Subject: [PATCH v2 4/5] apparmor: qemu access to @{PROC}/*/auxv for hw_cap Date: Tue, 4 Aug 2020 17:32:13 +0200 Message-Id: <20200804153214.1305009-5-christian.ehrhardt@canonical.com> In-Reply-To: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> References: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Jamie Strandboge , =?UTF-8?q?Guido=20G=C3=BCnther?= , Andrea Bolognani , Stefan Bader , Christian Ehrhardt 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefan Bader On some architectures (ppc, s390x, sparc, arm) qemu will read auxv to detect hardware capabilities via qemu_getauxval. Allow that access read-only for the entry owned by the current qemu process. Signed-off-by: Christian Ehrhardt Signed-off-by: Stefan Bader Acked-by: Jamie Strandboge --- src/security/apparmor/libvirt-qemu | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/lib= virt-qemu index b132cf0226..ae3db68f82 100644 --- a/src/security/apparmor/libvirt-qemu +++ b/src/security/apparmor/libvirt-qemu @@ -33,6 +33,8 @@ owner @{PROC}/@{pid}/task/@{tid}/comm rw, @{PROC}/sys/kernel/cap_last_cap r, @{PROC}/sys/vm/overcommit_memory r, + # detect hardware capabilities via qemu_getauxval + owner @{PROC}/*/auxv r, =20 # For hostdev access. The actual devices will be added dynamically /sys/bus/usb/devices/ r, --=20 2.27.0 From nobody Sun May 5 00:02:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=canonical.com ARC-Seal: i=1; a=rsa-sha256; t=1596555181; cv=none; d=zohomail.com; s=zohoarc; b=AW1FlDVHxnKBgsKLcJfSikONTCKujT4Bnte4roalNNSnT6mAHSyNbtfqPbnsgD413emew1JhuaDrvwBZshWwdhgQ9aC+AxK8TVRQenKt3qUHfYRdkkYdtebajry3noyIv49BeYh2HdHDgTybB1Juj/nDR0NC0KVdr3I4CaMgpis= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596555181; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MtaIc2tvynhVOEIIjyPN7UkLpkBP4PIj/kjTo4nwblk=; b=m8ivPNtjOKwf7bj74Mo7TIt+uMgMDKJS9d/ZKanxalH+ftXwGDqEKFKNSHXmMLjlxVO1eWYOGZLuZ+vxtqgvCTlmtT9F7EPdK2Vz2JW/O4BbYCFNdRohIRaFJJpThkdeW9iYasclCiQio04EMoXiuodZAsCbCMgdVJAJcGePLKY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1596555181738729.6553166878466; Tue, 4 Aug 2020 08:33:01 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-411-Oo_uCD6vPCG1iw-425bYrw-1; Tue, 04 Aug 2020 11:32:36 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6CFD0800138; Tue, 4 Aug 2020 15:32:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 279E719C58; Tue, 4 Aug 2020 15:32:30 +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 D779B1809554; Tue, 4 Aug 2020 15:32:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 074FWQi2020771 for ; Tue, 4 Aug 2020 11:32:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id E424E215688E; Tue, 4 Aug 2020 15:32:25 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B258E2156A2D for ; Tue, 4 Aug 2020 15:32:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2943918A6675 for ; Tue, 4 Aug 2020 15:32:23 +0000 (UTC) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-38-5Wt17mJoMXWfF-TAGfnM2Q-1; Tue, 04 Aug 2020 11:32:20 -0400 Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=Keschdeichel.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k2yvL-0002BM-Bc; Tue, 04 Aug 2020 15:32:19 +0000 X-MC-Unique: Oo_uCD6vPCG1iw-425bYrw-1 X-MC-Unique: 5Wt17mJoMXWfF-TAGfnM2Q-1 From: Christian Ehrhardt To: libvir-list@redhat.com Subject: [PATCH v2 5/5] apparmor: let qemu load old shared objects after upgrades Date: Tue, 4 Aug 2020 17:32:14 +0200 Message-Id: <20200804153214.1305009-6-christian.ehrhardt@canonical.com> In-Reply-To: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> References: <20200804153214.1305009-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false; X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Guido=20G=C3=BCnther?= , Jamie Strandboge , Andrea Bolognani , Christian Ehrhardt 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since [1] qemu can after upgrade fall back to pre-upgrade modules to still be able to dynamically load qemu-module based features. The paths for these modules are pre-defined by the code and should be allowed to be mapped and loaded from which will allow packagers avoiding the inability of late feature load [2] after package upgrades. [1]: https://github.com/qemu/qemu/commit/bd83c861 [2]: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1847361 Signed-off-by: Christian Ehrhardt Acked-by: Jamie Strandboge --- src/security/apparmor/libvirt-qemu | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/lib= virt-qemu index ae3db68f82..a03e9e2c94 100644 --- a/src/security/apparmor/libvirt-qemu +++ b/src/security/apparmor/libvirt-qemu @@ -169,6 +169,11 @@ /usr/{lib,lib64}/qemu/*.so mr, /usr/lib/@{multiarch}/qemu/*.so mr, =20 + # let qemu load old shared objects after upgrades (LP: #1847361) + /{var/,}run/qemu/*/*.so mr, + # but explicitly deny writing to these files + audit deny /{var/,}run/qemu/*/*.so w, + # swtpm /{usr/,}bin/swtpm rmix, /usr/{lib,lib64}/libswtpm_libtpms.so mr, --=20 2.27.0