Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1033042pxb; Fri, 15 Apr 2022 19:02:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaVCLUCqE4xMMoUhQ/GUHP6lPVeKZqM1/t7gEmcrcDBoxZgJUVI54NYaBt34Tho4AfMIn+ X-Received: by 2002:a17:90a:4813:b0:1c9:e5c3:5abf with SMTP id a19-20020a17090a481300b001c9e5c35abfmr7087383pjh.139.1650074554546; Fri, 15 Apr 2022 19:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650074554; cv=none; d=google.com; s=arc-20160816; b=zi2aUVc5bRaihSi7WLiaL06FB42qAFk3C6wwALYLU5qIdp6l0kZ9fBL8d2j9Ncba9B jwB1e0A5TX/ku22lckKWRuKn0Ho8ozRBkyRgSWyi7Mb8VEVftGJKqAjePfFKByVfRpxk YqRLQicbzAhK9X828KMaMs8rDtdeXdZC3SmoPk8EJlW1Dg4vfLWtNwXpJrp8Z+1TiKQJ aZaUr593DPF4tRbLFi92MigoqEKxOJaGYtG9jIfJKbu3r7YN8nLn4LsRW4kcJorUi/ub CyCIC60szssnOjTuU6U99lb9iQqNffY5cm4TXz93Ks7fP7611ZQEjyTDHF5li7Hfdisq Ktww== 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=cmu5IvUlLh73mv3X754Xej/gzYFBW82B1LnT1cqMcJw=; b=gFiIISb32qZIy9NewAMK7Hx2aA9QbmaLpTu+7AgowHEq7Fhd3py4s7O9R4ulHycpZi liHwpasu7qH4QZJKGEj7xx84CblyaSbdD6LweV2yuQZC3KyicJVtKjb5//U9ICLsIEA0 1aqJZbPb3vGctTw+eB79RcJKX/XWvgdf4wQu0Q4+BFXvovxFUuKp96PKRotDMZiHGLvH J8RQ+DSuT57MDG5nB+WEG+YHbrUs3T54NS5EUOQwrqsBv7YLCxRYvfLHpn1U6yZPSsP9 bb+iL0kSy2lbCi7F8SOKn9aw4Ix/BG+YPmBSahWWTLzj4ffZFh/QNl3zqj8cb77X72Zj hrKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wbi7heLS; 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 a7-20020a17090a688700b001bd14e03034si2918275pjd.12.2022.04.15.19.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 19:02: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=wbi7heLS; 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 755915AA64; Fri, 15 Apr 2022 18:22:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346026AbiDNNzV (ORCPT + 99 others); Thu, 14 Apr 2022 09:55:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245541AbiDNN3D (ORCPT ); Thu, 14 Apr 2022 09:29:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3753AD12D; Thu, 14 Apr 2022 06:23:09 -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 75FC7B82983; Thu, 14 Apr 2022 13:23:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD78FC385A1; Thu, 14 Apr 2022 13:23:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649942587; bh=utaBIuZOLBtXiQN4N4Zh4kTBVWVw5hJbIvn9YJrb1B0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wbi7heLSvQ/cdPT2kvEvpzHodMgdF6nylAu++us3mPUEDeAK8y/PxW/JIqsRomCsW m8O5AiiZRKVtOEUJI7oqlKoFIcBy4IgSjoBZj4sEVh68KcwDCvE1if6ROIh2dXBrHR 5RdxXdrQg08BUYK4XW3bWbrcZjkcSuildBccXERE= 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.19 188/338] selinux: use correct type for context length Date: Thu, 14 Apr 2022 15:11:31 +0200 Message-Id: <20220414110844.248047303@linuxfoundation.org> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220414110838.883074566@linuxfoundation.org> References: <20220414110838.883074566@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 91dc3783ed94..9e803d2a687a 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c @@ -349,7 +349,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