Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1232264rdb; Wed, 24 Jan 2024 08:35:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYjC1vvMSXDnOVt/B//++qODHSFfxzfRDQLCtpawgmS1GThyhLAdEOP+P0uDUbYFdxT6wt X-Received: by 2002:a05:651c:2109:b0:2cd:8cac:c915 with SMTP id a9-20020a05651c210900b002cd8cacc915mr698629ljq.150.1706114144261; Wed, 24 Jan 2024 08:35:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706114144; cv=pass; d=google.com; s=arc-20160816; b=UpIewHruHMDAS/eHGYkyKP51YOJXWslHajB36sAJDWvGl768woZ/WDCv13Oh8h2OEc ubwYKXXN5ZzfnZcupgLGKzuC5JTr7ocx5ml65sWd/P+kgwXKHxAPIdAY1Mh1wg2XXL6Z W0bAnvUsZhaNgx10QQ+DZc0IURa/zst5eIxutdADlUvns5mMFzCAKrkGQYQTIURJW9Eu 4s13ydzaYT+jihejPB7QamEID4fStuCkZ71WI7R2eh4dU+l/leZaLpZ9Kid5x90sV8oD mSlvpfBDQHlgKk8TRVcUWEQPyVrT7LLZnWF2YmuzQmC4yLDy6zVZNUst8+5v9xtmTIVw oHuA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Dc2ne9DEtozuAA7QWnRNqqOnd5KtqxPd0sphMP9Q6c4=; fh=8M3SFX2GbTOaT1DuB0BenfJSuMj2iYeUkZbBh9EeTI0=; b=U0Ye31rACmegwJC52huuxzVfXCtg0uqh7xVMWhNSIkgrNUzX05rCeNIF3lqNwdbkFd kaFrroBZQdWUgOkWNMOYDNrtYj/8xGGwI+lVksBHa/sBbM/505hV/o8Ah4OlZ1wRf30Q S2vk0gXJcl+awtPRPgHSijF6qjH/y7YfvsDUEgxLXQ+snkkKphqakZn3Yp5rl1MIkD3L 0L5RweEnxGzSvW3a6zcalCG9DKEaGn0Ek5Ju91uaSsri++aqy77A+x1fMQWcRKzL5kNQ 1lYkAkzHdj2t+E9jZshaeQuyGV8N/q5UV6w8C71nrqx41HIvnmeq6YzKa5X0M9fyB42g 5Fbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=L1yZ07PB; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-37339-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37339-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m28-20020a50999c000000b0055c13731ff5si4236327edb.263.2024.01.24.08.35.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 08:35:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37339-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=L1yZ07PB; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-37339-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37339-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 064A71F260BC for ; Wed, 24 Jan 2024 16:35:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 189677E569; Wed, 24 Jan 2024 16:35:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="L1yZ07PB" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6C3177652 for ; Wed, 24 Jan 2024 16:35:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706114132; cv=none; b=ThFJfXbjqtP5cQwcNI7o3Vc1NS5Eo0MbSCgi7bJFNDA1Tq2Mx7mq81PyHxrVZcra2ANrg4qsNvHGtg6A5DoNU1KhoKpxsa/E1E4oKiN6U8FbWKWT3gS16svGgubQxU4j7F5FNS16X0Sdm9w4S3rKiscU607ZNaff51ehnmkUBho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706114132; c=relaxed/simple; bh=bR0sAu/kS7bcb+D5Msz7ceuC42KnLeHSzNW2hRBbkrs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KRVPibvMmjO2YTmDPE3OP2OjVwRiW7fHtbDPH2mPr6UvV2CYnYAE5sDSyVx5+U4oMtCP2ghyP3ia9Kl+YAWzfEPxYDFN8+FKotJAsVmUjoXtx+vV0CGZCc9aWErFyW7xgUZFI6iDNfFAb72qyb1t9Lzp6K//AOhQq1R+smkX/Hg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=L1yZ07PB; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1d74dce86f7so29124835ad.2 for ; Wed, 24 Jan 2024 08:35:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706114130; x=1706718930; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Dc2ne9DEtozuAA7QWnRNqqOnd5KtqxPd0sphMP9Q6c4=; b=L1yZ07PBuH4ahcUdNgrGoL7mLH9141b7amG1yoAPASpabpStN2qFoJ9KrcqWlmj3vq rhoLfrZjYS20PKpjNaQRDUI4pDRigxtBge32DVThwsBJU8PbdJAaJHuiD7GxiYc+PQLa aM4VW2DmXtxMmDJsWLE5eWSdpBd96kbm25CJw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706114130; x=1706718930; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Dc2ne9DEtozuAA7QWnRNqqOnd5KtqxPd0sphMP9Q6c4=; b=ZfWtbRm1MTO/sPKOWtiRzPvdh4nrOWGRQSECBsf+mlG8yoJwjwkhhKI9a51F5D4iQW KHosmAof5lKqbeXYD4SSBKmsUX6GhSkVy0L+Jpg14gyG6CwpNb6FXdbUn9RQMaGDLrFL jCpmlNd8rplB+xJ9tgG7Sw8gOOpeZ/BasLf5341FbvI/ucNSUA7bfBuG3LrLHBaxfZb3 z44VNAfu4AMD4Jgck8+mQNuox9V2zQfejfk5FSSgzYlBa5I6vbuDkq+Z417QDhX5K1HE oILXfDWl10oTaAvWyKShjMz2W/Osg4qqbjmbUadcJiDzI6ui4Ozh2Bu0BJk5SYZtH/bN hhng== X-Gm-Message-State: AOJu0YxN6l/fzUEQEWAmLTiiDHpUGV3KAiZVkkZbfO7A7Yg6cW9EysiQ piDpPn0NrNt4ymo0GZUd2tYstyDVcfimCLOsLJr12OS5JpSkIPpSDOreigvii/XJ2zHc3mN31/o = X-Received: by 2002:a17:902:c20d:b0:1d7:5eef:4ed with SMTP id 13-20020a170902c20d00b001d75eef04edmr1176992pll.38.1706114130308; Wed, 24 Jan 2024 08:35:30 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id l12-20020a170902d04c00b001d73416e65bsm6909726pll.63.2024.01.24.08.35.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 08:35:29 -0800 (PST) Date: Wed, 24 Jan 2024 08:35:29 -0800 From: Kees Cook To: Kevin Locke , John Johansen Cc: Linus Torvalds , Josh Triplett , Mateusz Guzik , Al Viro , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [6.8-rc1 Regression] Unable to exec apparmor_parser from virt-aa-helper Message-ID: <202401240832.02940B1A@keescook> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jan 24, 2024 at 09:19:54AM -0700, Kevin Locke wrote: > Hello Linux developers, > > Using AppArmor 3.0.12 and libvirt 10.0.0 (from Debian packages) with > Linux 6.8-rc1 (unpatched), I'm unable to start KVM domains due to > AppArmor errors. Everything works fine on Linux 6.7. After attempting > to start a domain, syslog contains: > > libvirtd[38705]: internal error: Child process (LIBVIRT_LOG_OUTPUTS=3:stderr /usr/lib/libvirt/virt-aa-helper -c -u libvirt-4fad83ef-4285-4cf5-953c-5c13d943c1fb) unexpected exit status 1: virt-aa-helper: error: apparmor_parser exited with error > libvirtd[38705]: internal error: cannot load AppArmor profile 'libvirt-4fad83ef-4285-4cf5-953c-5c13d943c1fb' > > dmesg contains the additional message: > > audit: type=1400 audit(1706112657.438:74): apparmor="DENIED" operation="open" class="file" profile="virt-aa-helper" name="/usr/sbin/apparmor_parser" pid=6333 comm="virt-aa-helper" requested_mask="r" denied_mask="r" fsuid=0 ouid=0 Oh, yikes. This means the LSM lost the knowledge that this open is an _exec_, not a _read_. I will starting looking at this. John might be able to point me in the right direction more quickly, though. Thanks for the report! -Kees > > The libvirt-$GUID file is not created in /etc/apparmor.d/libvirt and > apparmor_parser is not executed as far as I can tell. > > I've bisected the regression to 978ffcbf00d82b03b79e64b5c8249589b50e7463. > Perhaps the change in this commit causes AppArmor to deny opening > /usr/sbin/apparmor_parser in preparation for exec? For reference, > /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper contains: > > /{usr/,}sbin/apparmor_parser Ux, > > I'd appreciate any help debugging the issue further. Let me know if I > should take it up with the AppArmor or libvirt developers to better > understand the issue. > > Thanks, > Kevin -- Kees Cook