Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3647708pxb; Tue, 19 Apr 2022 07:13:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0I5a1thArVqw7Vv2NStRMGFFN0lmpYzfR+ULukkAeQ4bK8Prf34jG8RubhzqBiLgeJN4S X-Received: by 2002:a05:6808:128c:b0:2da:3751:7639 with SMTP id a12-20020a056808128c00b002da37517639mr7532780oiw.294.1650377632655; Tue, 19 Apr 2022 07:13:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650377632; cv=none; d=google.com; s=arc-20160816; b=iyK4sHY59haWGT2G4bX2JrtOPae3UrlFmMFwvt41hkT0TX2wY+XdGazx5AxaUraJu/ baFfIySW3Btsz/RaTK+hsnw1ywwOJhVS+/gqwHMdBSrYajxbNrgH0LOXwVzDoKWOnXtW gheYjGqEHFjq4+31JnJ40VkRFBb8nOhGTzWYeXeEHM8OfArO2QxJMagkK8SNIM6D3sOY n+cD29/I+E4IvwKVhLwYr/51WW/au9n/vLzUS4VzYyGKx7kpAmERAVc7vgiHnZ27ylzX ICTxlFrbvPGkNZATMKhtamA0o0QkxJlmSVaMLilE8h7ydambamU4ZuBKvQxOGdIMVnCR V/lg== 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=oUkFDqXqKOhELsSuEhIm+qLhD6FtymoCDHcV20Y7bg8=; b=NNdYQygqDhvdzVLJGlZh+8HL2mZcYuAYZmWDfVqFfw5RS69G19cxQAyOeRG/5zCs7a nAa53AxotDsB/bZqJ/xO4QplSbhxlmvd1id44HGvgyPR653JQpTOlF6Zslj9KRnVVjMA Sq8MCBbAbV3WTeNxcellghh5ZQHpRyBFWQn9rQDIQtew5cgdeEok2Eg+wsutC8nqzYlR PlCecdmk8xKqHxGTq/ZKF4U7h0tKnr7enhvy8XyAzXXdtZ7+Nfp2W4KL3DJRoh5sJkav CTZzKNYesaVi6Z40jL/87W084ww9mzQwLHqKyoXBatAL4m7bako2QY0G2ORJV/Y8RiGh gBuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qrriEQer; 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 m17-20020a4ae3d1000000b0033a5a422634si1032329oov.51.2022.04.19.07.13.37; Tue, 19 Apr 2022 07:13:52 -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=qrriEQer; 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 S244990AbiDRNvL (ORCPT + 99 others); Mon, 18 Apr 2022 09:51:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244756AbiDRNax (ORCPT ); Mon, 18 Apr 2022 09:30:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 952CB1E3EB; Mon, 18 Apr 2022 05:55: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 2830CB80E59; Mon, 18 Apr 2022 12:55:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D345C385A7; Mon, 18 Apr 2022 12:55:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286511; bh=/vo9wHODavLrYY0UOvwE17d6nscfMAo4Qh6ACDAZ+g0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qrriEQerAho5LfnZPx0QzV+MU4VHWnl7pe6WPt7bKN2kTyOcsNdiF51hxOq0lNDuA S2J/uxc01pa+1YaEp78kA/T0xDeS5uKgDgy8FvG8afMxyQb5uOGzhBxLViaJOvad5V U9lzPlO6wJzk3VSLaqhVT6h3XrmLRNXy6Jd3K7Yc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Casey Schaufler , Sasha Levin Subject: [PATCH 4.14 157/284] Fix incorrect type in assignment of ipv6 port for audit Date: Mon, 18 Apr 2022 14:12:18 +0200 Message-Id: <20220418121216.202810958@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: Casey Schaufler [ Upstream commit a5cd1ab7ab679d252a6d2f483eee7d45ebf2040c ] Remove inappropriate use of ntohs() and assign the port value directly. Reported-by: kernel test robot Signed-off-by: Casey Schaufler Signed-off-by: Sasha Levin --- security/smack/smack_lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index a0e1b99212b2..fe070669dc18 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -2563,7 +2563,7 @@ static int smk_ipv6_check(struct smack_known *subject, #ifdef CONFIG_AUDIT smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); ad.a.u.net->family = PF_INET6; - ad.a.u.net->dport = ntohs(address->sin6_port); + ad.a.u.net->dport = address->sin6_port; if (act == SMK_RECEIVING) ad.a.u.net->v6info.saddr = address->sin6_addr; else -- 2.34.1