Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3647428pxb; Tue, 19 Apr 2022 07:13:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvKCXa8AipXMd2a3WJkR0QaSXxVt4MDq7BZCccOT/iJ2+9uGKWyWOvz5uHxAhjzjZkUxIf X-Received: by 2002:a63:50f:0:b0:3aa:55fb:149 with SMTP id 15-20020a63050f000000b003aa55fb0149mr216764pgf.232.1650377615559; Tue, 19 Apr 2022 07:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650377615; cv=none; d=google.com; s=arc-20160816; b=Z7+ApXTzllnrzuWoGWZoppWaUW+xcCnhxug2taQ96Y0qIFNbX2o2G3kOfh9NA2Pe+k dfiUTNSs5w1h71db/MoJqYqZpOoUxVFf0kiNidcWFpYi8uvcWmqOJEW+S7Qoe7iDeK8y CwZU9D0lEaTiMLpli/ArdMr/RHZiFQVQc1C/I6IcYt0OY+E4Chof8LoMpFQTkqyE+P8i lS9Oydd3GM23iDDEcBlmRzukubvFXpj3o2cTq44d+58YYiyvH1C6Py/RrEJbWEn2EYmK X0X7rcBn5shY/mJ7RItUHinS6JbadZ37vvu40pMoqwVhYDcwdmedVeClZOt43za+KnH4 k+TQ== 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=q6u33zA2P0BsgdUuGVXSdEduwoO/h3lDOsl7yT304sQ=; b=e+q/EUj7U4l+dDtMl9h9cxwsBAzyRuhR8yEZxxRZO9plrOPDxLT3w6RU6e1JFm4a3y k5ddPqSFL/sd4KZHWzelN8xL0YRM2ojzouO/O7KHMJzcLgBDdhuXB7AjofswsSfMNuIr 1L4HnvCzREUe72e9mc4wYG7hP9u3dxM1IKbMC7t2kAk0yYED8xhwILxI0I4l6vn2IwJu 4f4NgBq66QBSB4dQuRXL6uCXzZzbsnPY+c5lHYRieI+Zt42mMJDFXT8TiJxg+6IhemqD yM7bo5iYr8XbRuGzAqYga43UzoayT25zT4h/hyxxa4lCEaaIhWbvI6FDNflChdliElMy 1ZrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i2Kavqx0; 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 q135-20020a632a8d000000b003a9f17d7bf8si5852521pgq.480.2022.04.19.07.13.18; Tue, 19 Apr 2022 07:13:35 -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=i2Kavqx0; 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 S244486AbiDRNvE (ORCPT + 99 others); Mon, 18 Apr 2022 09:51:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244716AbiDRNat (ORCPT ); Mon, 18 Apr 2022 09:30:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF59C12ACD; Mon, 18 Apr 2022 05:55:06 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 6A94B60FD9; Mon, 18 Apr 2022 12:55:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61089C385A1; Mon, 18 Apr 2022 12:55:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286505; bh=zZZ8+bt+swbdKgisPUds2B86Lnz7Y1ZXyD/TXnFQ/U8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i2Kavqx0ww/l7t1HeOdcBSP7lGrYQoVgfNb0TqxU3GfscpHZ71071hzXi582w9gqH wP3Va7yMX78mDM96YtUu57Yq3p8PBeqS813l0N7CeGlhSTtxLj+yRMPiB9+EYFMRb6 7jNu6RxkqwY10QlMb+iihTMwvlRrWUcdU9PWxTEA= 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 4.14 155/284] selinux: use correct type for context length Date: Mon, 18 Apr 2022 14:12:16 +0200 Message-Id: <20220418121216.124701381@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@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.7 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 56e354fcdfc6..5304dd49e054 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c @@ -344,7 +344,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