From patchwork Wed Oct 9 18:24:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 175633 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1121827ill; Wed, 9 Oct 2019 11:26:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAIvlKuGfQH35ObxkyUytRrOpu/0lQSzGApo10IOt9R/gUtXYsOGji3JHkVbtkmDrKx5Uv X-Received: by 2002:a02:2244:: with SMTP id o65mr4600237jao.118.1570645615743; Wed, 09 Oct 2019 11:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570645615; cv=none; d=google.com; s=arc-20160816; b=Y16CHoJMPHsFkgfeLWsyViXDBPcgnN9amVmB4KL950P4so/EIC6eXfYRwQkSYr89n8 ZuAlRyRYeo6QmXrtvsHGd3jQzIGzSY2UKQb58xr9yh+lN8+m/D4W5i/sb9QYoWpcldeg w7B/E7D9EgU3dLaP5tomlPdJX5/Ij6xDSYB8Hh+/+gmWXJi8qQfH4c1vXFPb9ZlHe2ou LF/QTvcmKq2Akicgi/hYas+0ERclVzSRVymo7oSjsrUraAYI9fLW7P8FzrwyaW6kShcw CX8xxrdhnN7M+WTdXurPc2nOEe7lOMODT26oB4/P18uShuR79xwM7MVl/MSvS+RTeNwu uKWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:message-id:date:to:from:delivered-to; bh=5/rf0s5vNnWOMqkG/FSOmcVBahInnfXtzm04b8ECwbg=; b=NyY0kYslDpKoG1/JLijvOlq+gboIzvD2GaawJY0XE7ozGnncmKczZoAqtcmTp9ga3b 78tWtCwOW1KHSnAFa4nH6jOcVjHxY3mWXM8sTT6FEB17Pw7NwJ/kATaB0OpEnQ+wzZSH 0C0+op4iEUr+0cXe5uNsiAhix0Vo52zDLlUWaFeuw+RJxhZfu3UUghsGn7Tth3IYeM+C 3BeP5U2IO2s5VGDEjPfjtFZ24Y04MXyxzHQzCyYCpqg6Yj617oJbbxUZ+Wos1pJL0q5c BLNuetRye4KRW3w109FJ08ePYMucIHDa5zz1dz1OwHa2d8IK3v8re0h+WpEJVvpOWsVZ MqjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id t3si3537636jap.60.2019.10.09.11.26.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Oct 2019 11:26:55 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 mx1.redhat.com (Postfix) with ESMTPS id DD6DB18C4283; Wed, 9 Oct 2019 18:26:53 +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 69ACC19C69; Wed, 9 Oct 2019 18:26:53 +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 9A9EF1803B48; Wed, 9 Oct 2019 18:26:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x99IO79M019907 for ; Wed, 9 Oct 2019 14:24:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3A1C56060D; Wed, 9 Oct 2019 18:24:07 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-121-97.rdu2.redhat.com [10.10.121.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81EBD6092F; Wed, 9 Oct 2019 18:24:03 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 9 Oct 2019 14:24:32 -0400 Message-Id: <4f29d3bf533c9b30482b9a7fe72e454058962434.1570645360.git.crobinso@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: christian.ehrhardt@canonical.com Subject: [libvirt] [PATCH] security: apparmor: Allow RO /usr/share/edk2/ 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.62]); Wed, 09 Oct 2019 18:26:55 +0000 (UTC) On Fedora, already whitelisted paths to AAVMF and OVMF binaries are symlinks to binaries under /usr/share/edk2/. Add that directory to the RO whitelist so virt-aa-helper-test passes Signed-off-by: Cole Robinson --- I don't know if anyone is actually using apparmor on Fedora, but I have the libs installed now for testing. I think the better thing to do would be to adjust virt-aa-helper-test to not touch host state src/security/virt-aa-helper.c | 1 + 1 file changed, 1 insertion(+) -- 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: Michal Privoznik diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index d9f6b5638b..509187ac36 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -505,6 +505,7 @@ valid_path(const char *path, const bool readonly) "/vmlinuz", "/initrd", "/initrd.img", + "/usr/share/edk2/", "/usr/share/OVMF/", /* for OVMF images */ "/usr/share/ovmf/", /* for OVMF images */ "/usr/share/AAVMF/", /* for AAVMF images */