Message ID | 20200622022055.16028-1-bruceshenzk@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=OL4A=AD=lists.infradead.org=ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56AC76C1 for <patchwork-ath10k@patchwork.kernel.org>; Mon, 22 Jun 2020 18:18:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2FF4820656 for <patchwork-ath10k@patchwork.kernel.org>; Mon, 22 Jun 2020 18:18:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Zy0EA4p+"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MQSC7+8J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FF4820656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=pUGIY5Z74vLoqnt4foGNnFhJEbtmqVdXhJ+EVq8UGCY=; b=Zy0EA4p+ZxUIT5oMuMCUPXbDaY 8LA20ImrxPz52TowN+T9zx04+b4dWhxNTei7cynvU9LaGdXCPxmP+sWatUtJ3iRqJf+wih4MRsHJl axJufgGr1ptD4HSXpQD4Yl4t2e+GHHp3WObNJNSjZzcvdzVSDlC0m3LL5PwPJ791WTivt6Hua8G54 UHbrn4dXUQbV6WGKFzrdgXD/QzvuTil+FTIjhI6JGaksa9Z3kc9NcX9JGoXD1xPyqDYSJyrVeDxVw Ibw+4ipALSFoqREEkrr8wI7Cqc2YGnxHkSeTxHcbF/q/km1c2b9iI9KKWv9lED4o/vUmr98102/tX yiUT5ayA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnR1U-0003r7-8k; Mon, 22 Jun 2020 18:18:24 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnC5R-000682-DT for ath10k@lists.infradead.org; Mon, 22 Jun 2020 02:21:30 +0000 Received: by mail-qk1-x741.google.com with SMTP id 80so2403110qko.7 for <ath10k@lists.infradead.org>; Sun, 21 Jun 2020 19:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=2YE9gPP5bCoYsurMhSnWjNJyyw00QRCWcTkQq56FnVc=; b=MQSC7+8JsP0pBgEDfwg/fziotB/jhsLxre1enkWA/0pRx1zhCDstPx14yHBQaoXS8a oX0K1DudDD9np+Is9tU4KA26xyO7Y5jFqafTkc/cRIOHyVENPPqZlZMoDhAD+OVktIDJ umRMU8Y+mQW9Rs2j4HnYLXOWqvOX0tf5Que/4fqMXcrdL/rwzD3bgCkdXjxTUKHvomAo qsozYHUFh+xN96kL732IPPZ8cRUnWPWEMhGa8UWvgmBEPrrxFjdxz/mRoKDcT1U4BrON GduWUle3hJF9qP6h19pfXOVrol8Oxjz+J/hQ4WFMs+SEk/7NVnI85CKOnIL/ZuF4il5c fjsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2YE9gPP5bCoYsurMhSnWjNJyyw00QRCWcTkQq56FnVc=; b=MVVkoa/kCrgVxvhjYza4KQl/PCZjVCaiCof5GnHx5nisFofvpEhjkMZPmpcyqoo4ML +at7clR79Fnt0itrWI5T9Hza2X/aEIsG444a7tiQnAr0goF4zrJaD9riBgf+4t37yadM y54Li7NhQ0rm9u3Jg45HdHNLiuWYOAC6bMSgT7l4ikvDgVvGqJg8C4f+vqRJ9Qu6mapp YMPD5TajFMWbnkNczpDKHEUyzB/6E2CkCgc16eGl6bupW3djMHeUvK9vnrQaKqo2C0// tRmBFHM0KyDTiUWYXw47wJDG4WJYxPjU4qhpN+pJB67u6gonGzFTfvUfoIRhqtROtIbL +4KQ== X-Gm-Message-State: AOAM532CGEsp9wtNAra4nvswN23kCiylmieoUPwbX63zobyl/BKJFi/X zLd4jyVReJ4f5yO2Vs7EmZE= X-Google-Smtp-Source: ABdhPJwNHNw6nIS3omBcZml67Q873TZx3jnZ7lv3uMLIkAAIla8hsj7jyCAk0Fkt8jZtevE5u8fBlg== X-Received: by 2002:a05:620a:a1b:: with SMTP id i27mr7017238qka.429.1592792483901; Sun, 21 Jun 2020 19:21:23 -0700 (PDT) Received: from buszk-y710.fios-router.home (pool-108-54-206-188.nycmny.fios.verizon.net. [108.54.206.188]) by smtp.googlemail.com with ESMTPSA id f54sm1435295qte.76.2020.06.21.19.21.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jun 2020 19:21:23 -0700 (PDT) From: Zekun Shen <bruceshenzk@gmail.com> To: Subject: [PATCH] net: ath10k: santity check for ep connectivity Date: Sun, 21 Jun 2020 22:20:54 -0400 Message-Id: <20200622022055.16028-1-bruceshenzk@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [bruceshenzk[at]gmail.com] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:741 listed in] [list.dnswl.org] -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <ath10k.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/ath10k>, <mailto:ath10k-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/ath10k/> List-Post: <mailto:ath10k@lists.infradead.org> List-Help: <mailto:ath10k-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/ath10k>, <mailto:ath10k-request@lists.infradead.org?subject=subscribe> Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, Zekun Shen <bruceshenzk@gmail.com>, Jakub Kicinski <kuba@kernel.org>, "David S. Miller" <davem@davemloft.net>, Kalle Valo <kvalo@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" <ath10k-bounces@lists.infradead.org> Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org |
Series |
net: ath10k: santity check for ep connectivity
|
expand
|
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index 31df6dd04..e00794d97 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -450,6 +450,11 @@ void ath10k_htc_rx_completion_handler(struct ath10k *ar, struct sk_buff *skb) ep = &htc->endpoint[eid]; + if (ep->service_id == 0) { + ath10k_warn(ar, "HTC Rx: ep %d is not connect\n", eid); + goto out; + } + payload_len = __le16_to_cpu(hdr->len); if (payload_len + sizeof(*hdr) > ATH10K_HTC_MAX_LEN) {
Function ep_rx_complete is being called without NULL checking in ath10k_htc_rx_completion_handler. Without such check, mal- formed packet is able to cause jump to NULL. ep->service_id seems a good candidate for sanity check as it is used in usb.c. Signed-off-by: Zekun Shen <bruceshenzk@gmail.com> --- drivers/net/wireless/ath/ath10k/htc.c | 5 +++++ 1 file changed, 5 insertions(+)