Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp695511pxb; Tue, 5 Apr 2022 19:08:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0So65JjVkpQ6fKVbXgi6m3Iudnp1v0VeENHZ1MEuZtjkGZgVBDEh/TErKhyFduMLgGHfc X-Received: by 2002:aa7:dbd0:0:b0:416:633c:a0cc with SMTP id v16-20020aa7dbd0000000b00416633ca0ccmr6416944edt.349.1649210885898; Tue, 05 Apr 2022 19:08:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649210885; cv=none; d=google.com; s=arc-20160816; b=Vh6yrWNjtTfCmGMSIOn8BSja2atLGsZ7HBsTTdHqtiripFm1nhqNhPZTqY4AGzSHlz sWYvyVnPXvg3V+bsAEz71qmMbpsaqmOmo2N11qgCUrjsHCUcJHW3mjsNNNQwCT+IJXB+ haQMPbi99hWwQPeNhbbPC0X5dZFCM3oBEJ5kzHCIWwIVHZJccwHBYS4GHObEJMRjAX2t yy+S3kXYLbERS3M99fF9Ii+N85rqlGs3DLifeb0DhSEHBq15owMUNBSi5uvBpg+NGen3 bQ6Ay6Y11RMTi/fvluNSEVkoZcYHakkDwxHMLw9CknXQTSFk6djyCvbB3tORWTDSf+s0 6ABg== 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=B2SBDPDbKfmuapnSpc/vPFd/jF6k5lt4HaFoei9HfPYzY5etmr2M55vMp6Au5U5qUg UMb+4a/z0TNYEPeK9DBzOVVJsimsVz6oU7nKfWdTHszo5FbvOhmiUm4+YFI/EbsrbHnq 7dKC9wP+92I23AsVxhfeOoug07/jfqICE7P9BSqRCgG6agcvf/XGOEDJo0NX1B6Tx7Ft Q5dwKf1QszHWYQ4eOCy+3Mj4cdJWlutUoB+eQjeeiZnu8J0LMM/+8FZfUn5bhK/ANQuq GroQK82CBAepcyNwGSQD2tptNCMPFcuZXA0kDXebJg/8LoelC8DhRGxXOQDrz07dN2I2 zA9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=foT4cA70; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pj9-20020a170906d78900b006e801b7509fsi4705088ejb.318.2022.04.05.19.07.36; Tue, 05 Apr 2022 19:08:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=foT4cA70; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386957AbiDENOu (ORCPT + 99 others); Tue, 5 Apr 2022 09:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344241AbiDEJSz (ORCPT ); Tue, 5 Apr 2022 05:18:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E47F496AA; Tue, 5 Apr 2022 02:06:14 -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 D4D3FB81BAE; Tue, 5 Apr 2022 09:06:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44CD8C385A0; Tue, 5 Apr 2022 09:06:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149571; bh=vb2rgtgo3AKuSL5FE0QmtfS6g/HFe+78n9tRIvZUl7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=foT4cA70KKJs80GrqR7ro2ky7IIgJwYm0xZinRd4E4uJNDkyFJ5hL3jSFm90G2aQU dkFxQuW7HcYHbYKs1R9tcyp1Sr9ozU47C5ZuJxSlzamDXx6mXXwEyFIKwDnImAz8NV 3X3vYSzUhzx+OaQgIcKzzk3RIRnXk0Wf8YHO2yeg= 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.16 0764/1017] selinux: use correct type for context length Date: Tue, 5 Apr 2022 09:27:57 +0200 Message-Id: <20220405070416.940249234@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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