Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp663329pxb; Tue, 5 Apr 2022 17:50:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzvsLxWh4hL/AcwBh05ZI37aMpeVxylGHb7563WZjPp+Dob5qOqjm1G+90xi8pQqNpHWM9 X-Received: by 2002:a17:90b:1805:b0:1c7:ba88:9550 with SMTP id lw5-20020a17090b180500b001c7ba889550mr7209417pjb.16.1649206238508; Tue, 05 Apr 2022 17:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649206238; cv=none; d=google.com; s=arc-20160816; b=e9AnbrIrjX1rgQPCr1JkFeBog7LXE1/0fQJb49N+VHV0ojz94xbaHzxdqlYBAYmZdV 4k00c9YSqVJvQJT8sGUiSAIcGHj9T4rromRTTUJzmfJ2114mleK3kt0T0xU0vh0KndR5 cf+iEEFaBu//QW4OlZYCrnprlrbOR4YTILKCjlu/xWGp7UrpYXxQV6zuqfdnfWWft6/P BYuhUeETi0E2IgL3jBhPsojSGSr1reptUX/HNTSrJsVqtXUl1WXFp0ufgCqZeirri6jk gqGxbPOT1sV7oGgo2JEFE1Qhkx1ygj7H6uyzWevBgZY4SWWhWWUuBNlw9uAX0/zhJF/S 9vUQ== 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=LRPkarP/eLkWIMimLt6gK3NRLxjI8BKO5DWcwuMJolU=; b=JUnMuN42BMoLJtZgTRv4xE8IRTDHIQPmCaDJ9iUz9wduLe3/udi/vu+740YovnJSCe th0IwU7JRNgi7NED5yrNu3pHtFfwXGz3/R/WIkqLCbdWkPenaVS5wzod90nWiVA7t2+/ qKppt+6dIx4RmlAINmdcJZhf1sDGHEgyLxK6XFwWAY35lnfZ7hvo8yz3TLXn5kIz2M8i dBifxgeDyQ0YX2zFe7G3NwHnwjfw9PIi9/1/FfK+rOlBLWxNswwHLzoGWZeB2V0wJGhg ibuiSPlyUB5tHpq//WeS2yz3FdTu/P/llGqSQVo6rAq42PeJ93ZWVtxpeEHi5TL413GW 20lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WMIjZLVo; 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 h5-20020a170902f54500b00156c0b0a42asi4904856plf.113.2022.04.05.17.50.22; Tue, 05 Apr 2022 17:50:38 -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=WMIjZLVo; 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 S1379546AbiDENNp (ORCPT + 99 others); Tue, 5 Apr 2022 09:13:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344262AbiDEJTD (ORCPT ); Tue, 5 Apr 2022 05:19:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C28A49F08; Tue, 5 Apr 2022 02:06:26 -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 18C4561003; Tue, 5 Apr 2022 09:06:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 254DAC385A0; Tue, 5 Apr 2022 09:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149585; bh=7vpSFFkBZ0CepG+smmZf1HzNM6vjnLRDCijDDODvdhE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WMIjZLVoyuYk5Sf8iMXEwz5VICONRTRl6GMNTvnmLOo1ErhZiGK8zcj0LyiU0MokB gneLsI8k7WkkZH2uuod3RfsSErFyNcZRbtFqFWPhdcJ1zDVdoKlQcHmKDKmZt/3Yx2 CdBCiZbA1t8ouKjN2/Uq/I1llLvepowQs4MvThY4= 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.16 0769/1017] Fix incorrect type in assignment of ipv6 port for audit Date: Tue, 5 Apr 2022 09:28:02 +0200 Message-Id: <20220405070417.086572796@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: 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 efd35b07c7f8..95a15b77f42f 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -2511,7 +2511,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