Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7417493rwd; Tue, 20 Jun 2023 00:35:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6cwmroo6GrYUyf4AWogsur3Zgvo1aoOlqfKEbpdzvhca34zfuIHolWMpOK0bIMbLOvAvTk X-Received: by 2002:a17:90a:1db:b0:25b:d8b1:b68a with SMTP id 27-20020a17090a01db00b0025bd8b1b68amr6846606pjd.25.1687246514912; Tue, 20 Jun 2023 00:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687246514; cv=none; d=google.com; s=arc-20160816; b=A4Z5b7lAGwd8MOUeDiNX03xAsyQbbQgh0suH0V1+N0Q/GiQdkLnQ8/NLawTNYYYdcC kks6EC2VvnI+Zr+udXEE2Pd2Xq/jzas/vXhY6CwAJjkZ3k2TRi8QuPL3S2g5RFN4S3J4 EEMHh1pYhN0hsvUxc49ty12mTSyqy0lzZiZBOlSnxgrjlYnsUJQCRkX2uhe9AfSATXh/ 53o55hBqcAHNyIYILSrUJEtXnCNV7B2mASllCbXIdwNbrGFOzF5mzo3BIgxAcFF0QEHk X9ZBkkazf1iPnQIJpIaoMX8oqQs+vLMYNSiPRTk2crE0ZM8SgVH/pwcHIkRzBw01iZMy FLNw== 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:subject:cc:to:from:dkim-signature; bh=s67ry7Co9MPhktxsgxXhz8/DBce/8Tak4qy6/Iz1lww=; b=nguNtQ5Hj8wFYaxkYVJB20mVkHsZQQ7huunnJxZhckir3kOHG3/Yq3xj1AwWlYRpsL 9tx1t04OtByjJg1Xh8M5mCrJIG5vjcK0MT8fHB9JbTkG612ujfH/RwybiUQQY30hhvKC RhV2vFGT1ccAnFhU9gJAJbef9NhC6K90yH6zOmoZ430y4E5dHnxJW8Tn/HKUV+WqYyMc MoCl89S+EEoyCL+AdLY0yQkquwN4oDfHsPmloPhEMGyVpKi+SlWkQH6F0T+1+jDyw3d2 vAd4XTHtq74uqyANNMnq0Ny0cPDqGwk/nAwnffhDbKYfaLEfFO7278CN5UWkAmjoQZ4X jm3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=EtmzobNt; 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=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a637f0b000000b005538d9fe498si1158694pgd.414.2023.06.20.00.34.58; Tue, 20 Jun 2023 00:35:14 -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=@yandex.ru header.s=mail header.b=EtmzobNt; 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=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229901AbjFTHct (ORCPT + 59 others); Tue, 20 Jun 2023 03:32:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229683AbjFTHcs (ORCPT ); Tue, 20 Jun 2023 03:32:48 -0400 Received: from forward102c.mail.yandex.net (forward102c.mail.yandex.net [IPv6:2a02:6b8:c03:500:1:45:d181:d102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E9711D for ; Tue, 20 Jun 2023 00:32:46 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-39.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.sas.yp-c.yandex.net [IPv6:2a02:6b8:c08:2087:0:640:7bf5:0]) by forward102c.mail.yandex.net (Yandex) with ESMTP id 756AC6004B; Tue, 20 Jun 2023 10:32:44 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id UWb0SEqDfiE0-AGNkaZ9G; Tue, 20 Jun 2023 10:32:43 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1687246364; bh=s67ry7Co9MPhktxsgxXhz8/DBce/8Tak4qy6/Iz1lww=; h=Message-ID:Date:Cc:Subject:To:From; b=EtmzobNtIVFrceZeSKxv4ZJbLRBsLbEEhLwDE3Cu5s61KPFkzQLJPW4Rtiw5NHgnD BsXd099p1JskoPsBWiKy7dw6JZWjWnbHrlip5jAKFf5W9pemHcsO6Qi6KZVfLiFO3e w/l4e3XNErD/ZifyRTdcuMm14kA4SHcBqBsXs+6Q= Authentication-Results: mail-nwsmtp-smtp-production-main-39.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Dmitry Antipov To: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Cc: Kalle Valo , linux-wireless@vger.kernel.org, Dmitry Antipov Subject: [PATCH 1/2] wifi: ath9k: avoid using uninitialized array Date: Tue, 20 Jun 2023 10:31:57 +0300 Message-ID: <20230620073228.363207-1-dmantipov@yandex.ru> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 In 'ath_tx_count_frames()', 'ba' array may be used uninitialized, so add 'memset()' call similar to one used in 'ath_tx_complete_aggr()'. Signed-off-by: Dmitry Antipov --- drivers/net/wireless/ath/ath9k/xmit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index f6f2ab7a63ff..8babaaacacf5 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -466,6 +466,8 @@ static void ath_tx_count_frames(struct ath_softc *sc, struct ath_buf *bf, *nframes = 0; isaggr = bf_isaggr(bf); + memset(ba, 0, WME_BA_BMP_SIZE >> 3); + if (isaggr) { seq_st = ts->ts_seqnum; memcpy(ba, &ts->ba_low, WME_BA_BMP_SIZE >> 3); -- 2.41.0