From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFDFC1875 for ; Wed, 28 Dec 2022 16:07:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50B97C433F1; Wed, 28 Dec 2022 16:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1672243656; bh=7sjJ4Fdw+MreHOFVvOgpuhnwdQJ4IvbE2qMzOYOLmPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FriYpyEhDaKeH/xmfdn+7OhHE7CZ8AW5+EmI3Pk2DUG6yDsuAzmfOxj+PtmSia1LT ceWykw/KjVle3woPPwI5Q8mhjScBAtL18ccKoxJRc7Y/RC0exkqgGEGIsh9K3yLjWj 1Dw4s1m0+oYbeEnfJIHptN6yIzbKiwYzs8pm0V1k= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xiu Jianfeng , John Johansen , Sasha Levin Subject: [PATCH 6.0 0564/1073] apparmor: Use pointer to struct aa_label for lbs_cred Date: Wed, 28 Dec 2022 15:35:52 +0100 Message-Id: <20221228144343.376332163@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221228144328.162723588@linuxfoundation.org> References: <20221228144328.162723588@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Xiu Jianfeng [ Upstream commit 37923d4321b1e38170086da2c117f78f2b0f49c6 ] According to the implementations of cred_label() and set_cred_label(), we should use pointer to struct aa_label for lbs_cred instead of struct aa_task_ctx, this patch fixes it. Fixes: bbd3662a8348 ("Infrastructure management of the cred security blob") Signed-off-by: Xiu Jianfeng Signed-off-by: John Johansen Signed-off-by: Sasha Levin --- security/apparmor/lsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index e29cade7b662..9eb7972e08e4 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -1194,10 +1194,10 @@ static int apparmor_inet_conn_request(const struct sock *sk, struct sk_buff *skb #endif /* - * The cred blob is a pointer to, not an instance of, an aa_task_ctx. + * The cred blob is a pointer to, not an instance of, an aa_label. */ struct lsm_blob_sizes apparmor_blob_sizes __lsm_ro_after_init = { - .lbs_cred = sizeof(struct aa_task_ctx *), + .lbs_cred = sizeof(struct aa_label *), .lbs_file = sizeof(struct aa_file_ctx), .lbs_task = sizeof(struct aa_task_ctx), }; -- 2.35.1