Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp305802lqp; Thu, 21 Mar 2024 01:29:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpWbgdy2jf3m7/4EknVGRKAVdybW6xox0/8Z3X+2DCyYG2nmWAcCpUjmCqlYabbkMXwkX/a/P/GjJ6K1muNbW7JO+W5eUjsb0skma2pA== X-Google-Smtp-Source: AGHT+IGZS2hEGJ65SaTleDtdZhIunO6126igGrl5VMBYb7itLQxixp1oZZACtds2VVrpo7gEj4rN X-Received: by 2002:a67:fd76:0:b0:476:abf9:91f with SMTP id h22-20020a67fd76000000b00476abf9091fmr5226094vsa.13.1711009768358; Thu, 21 Mar 2024 01:29:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711009768; cv=pass; d=google.com; s=arc-20160816; b=XukT3hxkurnY2+7mAAsxmPkxuPeUScHVmvfeGjuAYort5DMCeCXzpWBO72e/fqbg6e 5dJXrChrQRcsibC7jfb/MRuOHQ+6Z+EgELui+xBOzmDMLMme7QAqrems5qIsPu+694TJ +GDos0V16tenjFUCrTSeXUycGKfsA1HBFBoNmdX47JQOiy37lad99HikNT4/VRuf2END XVjkxOnb0sGdsJ7TqGpLp4+KJZdm8H0aqePdHzk5o3hRcSPr2w5m2uPdtfN1HDQNL8Pf ZZvW0vIFfOg0nJoYisfpanGnaEofigNnJ+f6lC3NSiFH/279CHT5F8VmiTe5/fLYoxFD To0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=HoEqsrOEfudatPVu92pzr7a9z0pwpO2hLXXrl/1ytyY=; fh=3kX0IQXPyvmealL4HAIkwkJ83P4rdFtTW+m+MDDVwVQ=; b=dImAx1vzJGLl5xqpHpUamq+8yz5QTbU5i65kcBFZaHqsuNCY2+fIUyHaqmnJhS6K9G /f3tM583+YzaK/LJbZhn7hgyPvecBbeDP1FS59JU41ugbf2H50F4ySSil4YbbJAAVeRU Ze5r1+PJhgg9g30SgleHh3tUQMFhS7p88E8HHbG1u+ixmyjKdwGVlaWjcaPN5CV1NgWa JA0yNXPB+JUMEcxAs3kxWZrpuMe+HIoH6VcF4QEQsN6n8RyByUu13etsq5nlMOvVcWzO UL9Aw7gN2VsPWYvEAMfzIwpHifyzVezVDELH87kC1TGrF65iO53vhdsY41hviHt1wQHx GVZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S3PLOttA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-5085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bn37-20020a05620a2ae500b00789f94f2f5csi8788118qkb.783.2024.03.21.01.29.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Mar 2024 01:29:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S3PLOttA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-5085-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5085-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id BFE631C21326 for ; Thu, 21 Mar 2024 08:29:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51D9B69958; Thu, 21 Mar 2024 08:29:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="S3PLOttA" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F87E6994D; Thu, 21 Mar 2024 08:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711009763; cv=none; b=Uahta9xDGZDTXOroliyVeFMtxmrlZM1cFE2+FRhNkozGqV1FPy6Nx4+Z/XGtKWDFpv9HJs7wrX92AlO79uDj4eYSYuzID/azHj6RjJLBQzCzQ8FMR/ttGXaYjNWsR2/G2kd/PYC11o9WNoYyvZQsPieS5IVJmmgVZOAyWRuvXoo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711009763; c=relaxed/simple; bh=7kCuWcguJfXb+C5s5vznrmpMKt2aumVRMMbZ27GwQRI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=Tn6tPdeIMWlzv+iDYBWF7av1ygEI6GnjVUEb/DDZ1I+gFqZb0vmYwNyZlIVWyK7nPA74HlXtnSP84GTeYwbmfYR5MtFUE95k/+hp7RqatF1fnchsZLpBFN/rCR9xQ9a14Ho4q4bUwfWKGpporTaDPcK82ndu4LQW5Jvr/nfFpH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=S3PLOttA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDFA4C433C7; Thu, 21 Mar 2024 08:29:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711009762; bh=7kCuWcguJfXb+C5s5vznrmpMKt2aumVRMMbZ27GwQRI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=S3PLOttAxQVJs5+U1SxWEPd1adUzlZKsRvspPFtIee7I+PkW7lYi5w01c5dKOfR8K qvGRCZ2YCxx6++ElMesCX5CyH73jUNLxtPE4cKM6a9wo8lzNe1tcRBIbYxoKXdojFh rzGySzbifLgGxwVRBD7BKLGlx+Pu7nln3i78b/welbNKlYgUrQKOln7QJV/aHj/TNw ZtVAjCUxOLAvyXT/5kGJzi/Xys4ZhypuKbrShGMAcbNkruLovn5Auw/TV4+Skul6uF zShoCG2AovfLVmh8Odh0g7HqKFPD92U/d8sBpZ5hcpg41eNmllphYZ4nSfmO0OrINj rT9nl9deErSgA== From: Kalle Valo To: Edward Adam Davis Cc: syzbot+93cbd5fbb85814306ba1@syzkaller.appspotmail.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com, toke@toke.dk Subject: Re: [PATCH usb] wifi: ath9k: fix oob in htc_issue_send References: <0000000000004e41110614187d35@google.com> Date: Thu, 21 Mar 2024 10:29:18 +0200 In-Reply-To: (Edward Adam Davis's message of "Thu, 21 Mar 2024 15:31:33 +0800") Message-ID: <87bk789ee9.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Edward Adam Davis writes: > [syzbot reported] > usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008 > ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits > ------------[ cut here ]------------ > UBSAN: array-index-out-of-bounds in drivers/net/wireless/ath/ath9k/htc_hst.c:26:51 > index 255 is out of range for type 'htc_endpoint [22]' > CPU: 1 PID: 2494 Comm: kworker/1:2 Not tainted 6.8.0-rc6-syzkaller-00190-ga788e53c05ae #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 > Workqueue: events request_firmware_work_func > Call Trace: > > __dump_stack lib/dump_stack.c:88 [inline] > dump_stack_lvl+0x125/0x1b0 lib/dump_stack.c:106 > ubsan_epilogue lib/ubsan.c:217 [inline] > __ubsan_handle_out_of_bounds+0x111/0x150 lib/ubsan.c:347 > htc_issue_send.constprop.0+0x209/0x230 drivers/net/wireless/ath/ath9k/htc_hst.c:26 > ath9k_wmi_cmd_issue drivers/net/wireless/ath/ath9k/wmi.c:305 [inline] > ath9k_wmi_cmd+0x424/0x630 drivers/net/wireless/ath/ath9k/wmi.c:342 > ath9k_regread+0xdb/0x160 drivers/net/wireless/ath/ath9k/htc_drv_init.c:242 > ath9k_hw_read_revisions drivers/net/wireless/ath/ath9k/hw.c:287 [inline] > __ath9k_hw_init drivers/net/wireless/ath/ath9k/hw.c:572 [inline] > ath9k_hw_init+0xf02/0x2b30 drivers/net/wireless/ath/ath9k/hw.c:700 > ath9k_init_priv drivers/net/wireless/ath/ath9k/htc_drv_init.c:662 [inline] > ath9k_init_device drivers/net/wireless/ath/ath9k/htc_drv_init.c:839 [inline] > ath9k_htc_probe_device+0xb37/0x25f0 drivers/net/wireless/ath/ath9k/htc_drv_init.c:963 > ath9k_htc_hw_init+0x33/0x70 drivers/net/wireless/ath/ath9k/htc_hst.c:529 > ath9k_hif_usb_firmware_cb+0x272/0x620 drivers/net/wireless/ath/ath9k/hif_usb.c:1273 > request_firmware_work_func+0x13a/0x240 drivers/base/firmware_loader/main.c:1163 > process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 > process_scheduled_works kernel/workqueue.c:2706 [inline] > worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 > kthread+0x2c6/0x3a0 kernel/kthread.c:388 > ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 > ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:243 > > ---[ end trace ]--- > [Fix] > If the target does not return a valid end point id during the device connection > process, returns a failure. > > Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.") > Reported-and-tested-by: syzbot+93cbd5fbb85814306ba1@syzkaller.appspotmail.com > Signed-off-by: Edward Adam Davis This should go to ath tree, not usb. No need to resend because of this. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches