Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp532651pxr; Sun, 10 Apr 2022 23:58:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysBy1Frck94gxve3o64H9zA/hzLTt7z1ZTynV/Put/tuKbQTDx1KNOk8w340madjrg2O/h X-Received: by 2002:a17:906:7943:b0:6df:e5b3:6553 with SMTP id l3-20020a170906794300b006dfe5b36553mr28518844ejo.398.1649660305203; Sun, 10 Apr 2022 23:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649660305; cv=none; d=google.com; s=arc-20160816; b=pR7hxrcDeaFKDJWSlX/wpQi3mWEFrLCsy67BBjkoyLffSCCOs9lJ2K4pDkmNNVkg7r bWQsZRuKOAqBvrOZDVHzmchQ8KaMSATNoYGUVQsnCMPy2qkHhnABY0crRf7XlLVT/6Su +wu7ORNWCtjg5SFrOILEgFVwruhaWzJojV6zBXHj3TshyVD0g7v32d7OOk9rYkZ9vijw 7wIchBCij7fh7yrvKDoPmc1q7iQw3+3ouiTuYn2MH8xrm63Z/OybhyHh0EdwpV7uDLX3 8rlYxujk77chEeqKq+rlroVrylBiKGdsQQ2PBMjEo9/RljugaMTnU1m2Oh9rZgUfbzu4 Hu9w== 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 :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :from; bh=vgHyx9BgxzG0UUENvbI1qWkuRKnGIRcnPb2rw2vPhac=; b=X9oSa5Uw+z9fBLJPr+qKWDHDLHuQK7DyNtI/keNnoeTzjEISHpd1J7NEPhLh/71yEn HSkfvxgbMhE5Ts7463pMQiVfW86JNFr5ZlBdNzwkONC9CRYYiXtjIXhpEXwL4tk4p06P bzadb43aflznR86YkyG73hQFqY8sNNWRI2AZX/j2eNuQRwpkjohHekNlBYgxz6dkamOa 8lVdbVba3QbU7H12NIVfWiCtR1oEaczsRIe5VTwse339kp+uHsiGD19aKuYLJDgsON48 DDgMBP5eZmzrOG2a1G25X8D/KPFkgChP6AWSce7ZTFEDklJ72XSev21AimY/rA7QvgUu vz4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toke.dk header.s=20161023 header.b=hzIw18JJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=toke.dk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne3-20020a1709077b8300b006e7f5c8ca7csi8726023ejc.972.2022.04.10.23.58.03; Sun, 10 Apr 2022 23:58:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@toke.dk header.s=20161023 header.b=hzIw18JJ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=toke.dk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232363AbiDIVjf (ORCPT + 70 others); Sat, 9 Apr 2022 17:39:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbiDIVjd (ORCPT ); Sat, 9 Apr 2022 17:39:33 -0400 Received: from mail.toke.dk (mail.toke.dk [IPv6:2a0c:4d80:42:2001::664]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4EA726F7 for ; Sat, 9 Apr 2022 14:37:23 -0700 (PDT) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1649540241; bh=vgHyx9BgxzG0UUENvbI1qWkuRKnGIRcnPb2rw2vPhac=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hzIw18JJEu/uR3fjBa5QErIhy8JdKEc//GE+ftX+gw0dxf7BlJK5HF46iyfzQp+eh PUOnW8WZnud0l/ONM3GQks2gwaOZp+W63FLZUrr7pfBXxfx/BQQyj02c76Olmm1vik Grie5b1hj/aDWxV/IN7455ZrLkR/nY/LpGuQycwCTStbaQUu30sfk1yIr5dVRRL2Je KFAjfGxMPHXEoPN73uozsHrx+9txpc7gkBT2GWvnIwVo4C32mHxKNFsgUX/AKmS71V O9AuiF+BIXRg5ceUs1WtmuEcByuKtmka2iYBkPgKJpYHa09tlQqGWide/pQLkRf6G4 zN+gn/3jONl3w== To: Dan Carpenter , Oleksij Rempel Cc: Kalle Valo , Jakub Kicinski , Paolo Abeni , "John W. Linville" , linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] ath9k_htc: fix potential out of bounds access with invalid rxstatus->rs_keyix In-Reply-To: <20220409061225.GA5447@kili> References: <20220409061225.GA5447@kili> Date: Sat, 09 Apr 2022 23:37:21 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <87tub26ir2.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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-wireless@vger.kernel.org Dan Carpenter writes: > The "rxstatus->rs_keyix" eventually gets passed to test_bit() so we need = to > ensure that it is within than bitmap. s/than/the/ ? This I think Kalle can fix up when applying :) > drivers/net/wireless/ath/ath9k/common.c:46 ath9k_cmn_rx_accept() > error: passing untrusted data 'rx_stats->rs_keyix' to 'test_bit()' > > Fixes: 4ed1a8d4a257 ("ath9k_htc: use ath9k_cmn_rx_accept") > Signed-off-by: Dan Carpenter Acked-by: Toke H=C3=B8iland-J=C3=B8rgensen