Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2029039lqa; Tue, 30 Apr 2024 06:37:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6XRKpHOdTR0sI/o1hMlq7Wer/0m5Cufb9q7NLjYdUxjHGnWXHtqJ493txRa0ukqX5nHfjaDi1hQ3M3g3Os9vsZm7exqvm2ln+7O1KlA== X-Google-Smtp-Source: AGHT+IHE2oRFvGSp8/wbe/aqBuM5A69QG+Dpa4QWilaKMpMLipuxi5eUqMPqc0YAzn5gsFU10Fo3 X-Received: by 2002:a05:622a:47c6:b0:434:739e:4225 with SMTP id dp6-20020a05622a47c600b00434739e4225mr15279193qtb.67.1714484252617; Tue, 30 Apr 2024 06:37:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714484252; cv=pass; d=google.com; s=arc-20160816; b=c13GbzrJGgYcEKyXdRLqZW8Y8pS2gzL9JyuGK1o+LGUivd+cTgfhrOpd3A4bCaAYB8 JdttDoASs+hcRw8IVfTc9/SZh++X8bd14AT3+D841mRr/eV26K5/9gSOo9Rp105EV2c/ A/8hv1K9GUt+Awo65sjhaLkkgnrC691DEA4hYSuS5oRQkPagExV7soCY/eNb+ztwonDc T+mfNAN6f2o/9W/5k3bJWPBUWyRqW+WsaqhwZBoEHowsedhkiUhkS32rIQVYMYX336BW XbTAAQbJqYVKKD1jT6o1cV3Mx564Ztxmb8wrXv8BPkz7M6TfhXekXxPph+0vcQLdOtgi UeTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:user-agent:cc:to:references:in-reply-to:from :subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=8HQga4XMZ2DT8zNK2KgJ8R3ucAEe+5JbiJmG1FhAU/w=; fh=W4Y5j0c1BKYaiHNfAHeHS6GOfw+wSOUAW9nEc609Qpc=; b=SEIQ1sNENhAtFfuxpy3+fzw07T4Qk8ojL0nJU9aAXyCPZScFWlF3bUXKe/mfGJG8nQ Sa0OJZ3T6cmsYyI7WQa86QKU49+5k+e5OBPunbjKWIOntq9SxCn/0qHvLH5i+3eNswb/ 5gc2cn2so7DuCd7eJmZKY6R5pNWT41FWuHuqgu9mUmAkOX2Zwirk1tWOKJmNfs02QA3/ KI9iOemFr11btAnQ6UtCP/U8esRQl5f08T8oPerJIc8KCgyuS/XT01OzgaKvExo4LQPX /zZ2OwVAc/cds7Vk66dDJAfPhyOTvsQfrC8pQSGCMuu4A5XBqlBp6HmLWBss6TiyqIw/ U5FQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C9EMHaxg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-7049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7049-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id cb18-20020a05622a1f9200b00437b43948eesi29823921qtb.747.2024.04.30.06.37.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 06:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C9EMHaxg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-7049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7049-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 3766A1C20491 for ; Tue, 30 Apr 2024 13:37:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E9C1171E45; Tue, 30 Apr 2024 13:37:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="C9EMHaxg" 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 E9E3316F859; Tue, 30 Apr 2024 13:37:24 +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=1714484245; cv=none; b=tkCV9g03QfEd8GvRJkzQwweXS3KRezU6VQW1Mmna6rzr7ZWCWx8U2KSiKBUUfac8Osz3eGJ/5z0zs1nrEBumZy9ZZ6mn3MhYObo1/SIf9GnUsOfOCxTjDB7CG8VXYIPLPMohb8sUrdqVo0LqEJa44Oik4PiADockgVQKexMWImY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714484245; c=relaxed/simple; bh=y5evCM8bH+FCtnusnsHECbkq6iUTlw3xWVjkltMpl3A=; h=Content-Type:MIME-Version:Subject:From:In-Reply-To:References:To: Cc:Message-ID:Date; b=e8PRmQAiC+MahP+gxRC6hnvho7PopWM2E+dzh1stuSFPNew+rAvfKGy/3pnJ+SLMKwMa5zRH7TZTV71WVuPi3kz8Fmre5bx91UtvBNVTxG6KHMsZnK4knoofXYyS1CZpAYLD/MJMkNlISL+uYNNiob+5hk+FyGB1kpwlqRbujeI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=C9EMHaxg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92B8DC4AF18; Tue, 30 Apr 2024 13:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714484244; bh=y5evCM8bH+FCtnusnsHECbkq6iUTlw3xWVjkltMpl3A=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=C9EMHaxgK/1Sqyn2OLj3vbwWoou0zsYNsbMFw9Rw53B2N62qiGcxh03aW9mrusTMr Gjvqq0RcGvMsvK39H9eDlkNayson7heNTuZHa921A77j/lozmmf0zOYb0Zd27lyl1e 9XCWuyLTcVWyILbzep9GWS+ntylkKcJerQRIPZ9CDvRgrcyFbqw1QvuIdMieSN7ToZ qZbZqoGJMHW9H0DOS2eczlgEOuqOZwYkfXKcfS8fwrim1DCqm0Y9DXk/IhwQ1WhCsk S6JPkp0tSFgDo1rtF6kOISWl6ItqH5PC31/JauV6Dr4371/cjF8hLmnaYvOXA2MZsN /BdaNliVIC3cg== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH v2] wifi: ar5523: enable proper endpoint verification From: Kalle Valo In-Reply-To: <20240408121425.29392-1-n.zhandarovich@fintech.ru> References: <20240408121425.29392-1-n.zhandarovich@fintech.ru> To: Nikita Zhandarovich Cc: Nikita Zhandarovich , Wu Yunchuan , Johannes Berg , "Breno Leitao" , , , , User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <171448424101.313333.6825523466600682181.kvalo@kernel.org> Date: Tue, 30 Apr 2024 13:37:22 +0000 (UTC) Nikita Zhandarovich wrote: > Syzkaller reports [1] hitting a warning about an endpoint in use > not having an expected type to it. > > Fix the issue by checking for the existence of all proper > endpoints with their according types intact. > > Sadly, this patch has not been tested on real hardware. > > [1] Syzkaller report: > ------------[ cut here ]------------ > usb 1-1: BOGUS urb xfer, pipe 3 != type 1 > WARNING: CPU: 0 PID: 3643 at drivers/usb/core/urb.c:504 usb_submit_urb+0xed6/0x1880 drivers/usb/core/urb.c:504 > ... > Call Trace: > > ar5523_cmd+0x41b/0x780 drivers/net/wireless/ath/ar5523/ar5523.c:275 > ar5523_cmd_read drivers/net/wireless/ath/ar5523/ar5523.c:302 [inline] > ar5523_host_available drivers/net/wireless/ath/ar5523/ar5523.c:1376 [inline] > ar5523_probe+0x14b0/0x1d10 drivers/net/wireless/ath/ar5523/ar5523.c:1655 > usb_probe_interface+0x30f/0x7f0 drivers/usb/core/driver.c:396 > call_driver_probe drivers/base/dd.c:560 [inline] > really_probe+0x249/0xb90 drivers/base/dd.c:639 > __driver_probe_device+0x1df/0x4d0 drivers/base/dd.c:778 > driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:808 > __device_attach_driver+0x1d4/0x2e0 drivers/base/dd.c:936 > bus_for_each_drv+0x163/0x1e0 drivers/base/bus.c:427 > __device_attach+0x1e4/0x530 drivers/base/dd.c:1008 > bus_probe_device+0x1e8/0x2a0 drivers/base/bus.c:487 > device_add+0xbd9/0x1e90 drivers/base/core.c:3517 > usb_set_configuration+0x101d/0x1900 drivers/usb/core/message.c:2170 > usb_generic_driver_probe+0xbe/0x100 drivers/usb/core/generic.c:238 > usb_probe_device+0xd8/0x2c0 drivers/usb/core/driver.c:293 > call_driver_probe drivers/base/dd.c:560 [inline] > really_probe+0x249/0xb90 drivers/base/dd.c:639 > __driver_probe_device+0x1df/0x4d0 drivers/base/dd.c:778 > driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:808 > __device_attach_driver+0x1d4/0x2e0 drivers/base/dd.c:936 > bus_for_each_drv+0x163/0x1e0 drivers/base/bus.c:427 > __device_attach+0x1e4/0x530 drivers/base/dd.c:1008 > bus_probe_device+0x1e8/0x2a0 drivers/base/bus.c:487 > device_add+0xbd9/0x1e90 drivers/base/core.c:3517 > usb_new_device.cold+0x685/0x10ad drivers/usb/core/hub.c:2573 > hub_port_connect drivers/usb/core/hub.c:5353 [inline] > hub_port_connect_change drivers/usb/core/hub.c:5497 [inline] > port_event drivers/usb/core/hub.c:5653 [inline] > hub_event+0x26cb/0x45d0 drivers/usb/core/hub.c:5735 > process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289 > worker_thread+0x669/0x1090 kernel/workqueue.c:2436 > kthread+0x2e8/0x3a0 kernel/kthread.c:376 > ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 > > > Reported-and-tested-by: syzbot+1bc2c2afd44f820a669f@syzkaller.appspotmail.com > Fixes: b7d572e1871d ("ar5523: Add new driver") > Signed-off-by: Nikita Zhandarovich > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. e120b6388d7d wifi: ar5523: enable proper endpoint verification -- https://patchwork.kernel.org/project/linux-wireless/patch/20240408121425.29392-1-n.zhandarovich@fintech.ru/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches