From patchwork Fri Oct 6 18:49:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1844593 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S2HYg1ll3z1yq9 for ; Sat, 7 Oct 2023 05:50:30 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qoptw-0003nQ-FX; Fri, 06 Oct 2023 18:50:16 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qoptp-0003n7-Ly for kernel-team@lists.ubuntu.com; Fri, 06 Oct 2023 18:50:09 +0000 Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 4FADB3F443 for ; Fri, 6 Oct 2023 18:50:09 +0000 (UTC) Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-57b6d19955bso3100294eaf.1 for ; Fri, 06 Oct 2023 11:50:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696618207; x=1697223007; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MfWfFNPMl0d6f/e67SYA91BQS0XUJlxgVyOxLLP4uF4=; b=Roe1lQw/waDZgwxnWpYq3fNemfXxPGAVeSU79KWE1t+KqLrHGyDa1ujb4B9aHn5RS6 0aWe07kwyMSK4TUWSmyjYD7eul71V78uQrwTPj0nudvtlGgKd8x8Nd0InOJF63mivAzK IFdfRHJPSaP/nrE1RkpfqHOxesnmKlTyYVTcoKzxYBT2xxxiDrTTL25tZ0xALETI24BM ZWlTbSHnpzk7NtYbM2HGW36L6Eff6Hd3+doFLSDammVrAX26C9UcxUYmOFtAaAe3buoK bGWbkGduH1iZv/1hTqecCsWwJp1TeGAgko7MOaw5QTopw8dbRAQjOr4iJAtzRfhxv6iT kDQQ== X-Gm-Message-State: AOJu0YxNbDJNXyBX014klxUL6XDrulI5ptNk7NBTMj9ys1UdyNwl5Zit HTw3nH0zYdSION6cIELbPG70e3dIOJ63xni4lom8R62L0lZjzPdbceEjQ7gATLMVbJDT9lxalc+ xSPPXFT1nlYU+0sD0/vW28/v3goQjoMUXWV5yIHb9GfRBSp/UHlmhLFk= X-Received: by 2002:a05:6358:8a2:b0:14b:86a3:b3f0 with SMTP id m34-20020a05635808a200b0014b86a3b3f0mr9758449rwj.5.1696618207551; Fri, 06 Oct 2023 11:50:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMwt5qgCvpHckXA11bSoHoQeguwEcD3t28TgYwlwWYMyNIZKQELYOL1BgML9eCtrRqZMEAnA== X-Received: by 2002:a05:6358:8a2:b0:14b:86a3:b3f0 with SMTP id m34-20020a05635808a200b0014b86a3b3f0mr9758425rwj.5.1696618207133; Fri, 06 Oct 2023 11:50:07 -0700 (PDT) Received: from localhost ([2001:67c:1560:8007::aac:c15c]) by smtp.gmail.com with ESMTPSA id 30-20020a17090a191e00b002792b7182dcsm6246215pjg.49.2023.10.06.11.50.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 11:50:06 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: ACK: [PATCH] UBUNTU: SAUCE: apparmor: Make apparmor_restrict_unprivileged_unconfined opt-in Date: Fri, 6 Oct 2023 19:49:53 +0100 Message-Id: <20231006184953.3820464-1-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <57ecb1e6-b0b5-e2f7-e4de-3e8337784316@canonical.com> References: <57ecb1e6-b0b5-e2f7-e4de-3e8337784316@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: John Johansen BugLink: http://bugs.launchpad.net/bugs/2038567 Existing applications with apparmor confinment have been discovered to behave incorrectly with the newly added apparmor_restrict_unprivileged_unconfined feature when enabled by default with an opt-out. Make this feature opt-in, to unbreak existing stable production software, most notable LXD. This security feature can be enabled with: sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=1 Signed-off-by: John Johansen Signed-off-by: Dimitri John Ledkov Acked-by: Andrea Righi --- Apply on top of Ubuntu-6.5.0-7.7 release for Mantic GA security/apparmor/policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c index 9842561680..2e58bc5732 100644 --- a/security/apparmor/policy.c +++ b/security/apparmor/policy.c @@ -91,7 +91,7 @@ int unprivileged_userns_apparmor_policy = 1; int unprivileged_userns_restricted = IS_ENABLED(CONFIG_SECURITY_APPARMOR_RESTRICT_USERNS); int unprivileged_userns_restricted_force; int unprivileged_userns_restricted_complain; -int aa_unprivileged_unconfined_restricted = 1; +int aa_unprivileged_unconfined_restricted = 0; int aa_unprivileged_uring_restricted; const char *const aa_profile_mode_names[] = {