From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41E6EC35294 for ; Thu, 14 Apr 2022 14:53:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346459AbiDNOur (ORCPT ); Thu, 14 Apr 2022 10:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345210AbiDNNp1 (ORCPT ); Thu, 14 Apr 2022 09:45:27 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD3F82DE0; Thu, 14 Apr 2022 06:43:02 -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 sin.source.kernel.org (Postfix) with ESMTPS id 5CF8FCE29B0; Thu, 14 Apr 2022 13:43:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77095C385A1; Thu, 14 Apr 2022 13:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649943779; bh=4O0N2N8QRgt9YtZz4EGkGqK582Qf7irZX4OwaBX3SkI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M6gvZYIG7hOOLlh3Uq5uFpE/F8qB0K6DPtFiCUeplsKBYM4qo2NAO/p7KlAfjtbbK 38t6Nk4uFGl7FIovc053//fIA8rqS+oCYvMTQG5vn85lfoATrWP7L3l4Wpztua7ZsN /s+m4CM+dp/h8xxcCZknCbY1ezHcZPLup2RcqpzY= 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 5.4 279/475] Fix incorrect type in assignment of ipv6 port for audit Date: Thu, 14 Apr 2022 15:11:04 +0200 Message-Id: <20220414110902.909125869@linuxfoundation.org> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220414110855.141582785@linuxfoundation.org> References: <20220414110855.141582785@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 12c0fa85d9f8..0253cd2e2358 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -2501,7 +2501,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