From nobody Thu Apr 25 08:18:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=canonical.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1581593583045435.09867393198044; Thu, 13 Feb 2020 03:33:03 -0800 (PST) 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-234-SN7Q-EWFM7O0VNCxcYDvIQ-1; Thu, 13 Feb 2020 06:32:59 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C9621800D6B; Thu, 13 Feb 2020 11:32:52 +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 94FE960BF4; Thu, 13 Feb 2020 11:32:51 +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 942211809567; Thu, 13 Feb 2020 11:32:47 +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 01DBWi3H031936 for ; Thu, 13 Feb 2020 06:32:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5103010551AF; Thu, 13 Feb 2020 11:32:44 +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 4C89910551B0 for ; Thu, 13 Feb 2020 11:32:42 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.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 8BFBD85A331 for ; Thu, 13 Feb 2020 11:32:42 +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-176-3bcFIN_eNyev9iOxJJ0wPg-1; Thu, 13 Feb 2020 06:32:40 -0500 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 1j2CjW-0002mu-Fx; Thu, 13 Feb 2020 11:32:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581593581; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=RLd65Tl1hSYQyvcJVPrPuHIr1fG0uc/QVIiPoJ6Tp0s=; b=ArFr5an50rOqYchAoWPxrJxmvxTlajMRVGuSfUqiEpOrECGJvDW9TWhkQyVOH/OH0PcMY5 dbh0P0/W3u8O5JeBmIvTwb/McfimmcetWPLTf9HFveUX7tXUDu4Yf0lNobXgKa9C/BqAaA a+HJd+J5f/k5zzYwMjbuFxMGY5EZoGY= From: Christian Ehrhardt To: libvir-list@redhat.com Subject: [PATCH] apparmor: allow to call vhost-user-gpu Date: Thu, 13 Feb 2020 12:32:36 +0100 Message-Id: <20200213113236.24358-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 X-MC-Unique: 3bcFIN_eNyev9iOxJJ0wPg-1 X-MC-Unique: SN7Q-EWFM7O0VNCxcYDvIQ-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 01DBWi3H031936 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Guido=20G=C3=BCnther?= , 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.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Configuring vhost-user-gpu like: Triggers an apparmor denial like: apparmor=3D"DENIED" operation=3D"exec" profile=3D"libvirtd" name=3D"/usr/lib/qemu/vhost-user-gpu" pid=3D888257 comm=3D"libvirtd" requested_mask=3D"x" denied_mask=3D"x" fsuid=3D0 ouid=3D0 This helper is provided by qemu for vhost-user-gpu and thereby being in the same path as qemu_bridge_helper. Due to that adding a rule allowing to call uses the same path list. Signed-off-by: Christian Ehrhardt Reviewed-by: Jim Fehlig --- 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 b384b7213b..1e137039e9 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,lib64,lib/qemu,libexec}/vhost-user-gpu PUx, =20 # Required by nwfilter_ebiptables_driver.c:ebiptablesWriteToTempFile() to # read and run an ebtables script. --=20 2.25.0