Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp784269pxb; Tue, 5 Apr 2022 23:11:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd8ufzEGhBSqwDB3DMwm8o0NIPVQQTuUzeNKWO4TCgU9/MYqKIRQO0Cw0/T3oZVgmqnvg9 X-Received: by 2002:a17:902:f687:b0:154:64be:3518 with SMTP id l7-20020a170902f68700b0015464be3518mr7109455plg.4.1649225494713; Tue, 05 Apr 2022 23:11:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649225494; cv=none; d=google.com; s=arc-20160816; b=IWjCkuytSgIIdYuwozSHmXfWyHZcbincs+RfnQjmacN4BxFAW7lgoKCrnERvfym4PW Su2Lhma1kwmY022EuJ/3Xhc8zNMeDK+OGKnUHXL2IR0pGh5TqMh8JeIjrVIvC2XE25P4 ug5kzhWg1kbyF/ng1w6NB2uVo+Byccp+4Vlko95OWKmzcaJg2S9J9RdX1ygm32treXZP brekI9KLtmfY8ZX4myRIAXRTKpT/w5/SZl1/unHiU0tP1/em26nvm2F+m0EEsGgxi1oG tBEKvtpQYQQ7me2izMVm4DcCKKgmVSCDDkINaB0aEQg7ASXhobLWOYA+HxcRAXttwODx ItYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZnmTVTHgIhPov00ZmbTlTn72rYFnfqlnLBtmRAOiSKY=; b=QI7j4Q4YgW6J8FsHXIpy2M+eK4OMMSh+XswSYvD9t1z7nQDXkWyvxX8Y+k9f4olZe/ xUOnQLRELl2L9RnkKJn7djDXvmh9rYVe+bPESSpTCMjN76t4kIYtXmhH54D/EDozQF9Z U0DxwTI1N57y+y3YBCgmxDUVoUxRudT7m3XX+Ke8iFpDky0zexwldcPrayQ4ayquR1Tv x6f5Ril/Y7F1KdbgePSssTlRrZte9is0DdZYa4yuQZ8CEPjO8t8MJqYZjqNysCM/vAq/ jrgdDm9VNsyeqrSEvDzw6x83hma0uuuuYnDoFj5xDfsapXSTWCUPaKt/Ohw5cEX8eB0c ieuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pRAuGE6J; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m5-20020a6545c5000000b003989bdcc228si15556750pgr.59.2022.04.05.23.11.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 23:11:34 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pRAuGE6J; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 812604B9F26; Tue, 5 Apr 2022 22:58:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1838683AbiDFA40 (ORCPT + 99 others); Tue, 5 Apr 2022 20:56:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349927AbiDEJwF (ORCPT ); Tue, 5 Apr 2022 05:52:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B56DD31DEE; Tue, 5 Apr 2022 02:50:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6617EB81B97; Tue, 5 Apr 2022 09:50:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCDE6C385A1; Tue, 5 Apr 2022 09:50:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649152205; bh=vb2rgtgo3AKuSL5FE0QmtfS6g/HFe+78n9tRIvZUl7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pRAuGE6JMZD4vFVEj6AjQnMBUqvW/hXutHsQP1jIrdah/WYzdlHj4xEf8qNUySlBB Zzxn3ofMxeaKOGRy08eVeTB2RB7sGwlxGnkyLC4yLP7OMpyRxGGC1wCuOaY2U7qqM/ VB7oi4JDahpO94TEEKP3qEBlB6ti9tRENFNK4puE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20G=C3=B6ttsche?= , Paul Moore , Sasha Levin Subject: [PATCH 5.15 692/913] selinux: use correct type for context length Date: Tue, 5 Apr 2022 09:29:14 +0200 Message-Id: <20220405070400.578773470@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian Göttsche [ Upstream commit b97df7c098c531010e445da88d02b7bf7bf59ef6 ] security_sid_to_context() expects a pointer to an u32 as the address where to store the length of the computed context. Reported by sparse: security/selinux/xfrm.c:359:39: warning: incorrect type in arg 4 (different signedness) security/selinux/xfrm.c:359:39: expected unsigned int [usertype] *scontext_len security/selinux/xfrm.c:359:39: got int * Signed-off-by: Christian Göttsche [PM: wrapped commit description] Signed-off-by: Paul Moore Signed-off-by: Sasha Levin --- security/selinux/xfrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index be83e5ce4469..debe15207d2b 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c @@ -347,7 +347,7 @@ int selinux_xfrm_state_alloc_acquire(struct xfrm_state *x, int rc; struct xfrm_sec_ctx *ctx; char *ctx_str = NULL; - int str_len; + u32 str_len; if (!polsec) return 0; -- 2.34.1