Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7720302rwl; Tue, 10 Jan 2023 04:41:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXvZc73uRWBfVm4Ou6v74/Lkr9MN17CH612g/fqYpsSR/q19imu1PxH6VY47QUpPhCc2kmWB X-Received: by 2002:a17:907:b9d5:b0:81e:8dd4:51c3 with SMTP id xa21-20020a170907b9d500b0081e8dd451c3mr58347224ejc.76.1673354500554; Tue, 10 Jan 2023 04:41:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673354500; cv=none; d=google.com; s=arc-20160816; b=dbcSC3WAtO1pnsl0Jy2oY9Eg8qxQ7cOIHr1Rk+t+5YY5h0ZWHn2O/xfymDuR/6Y47s XcMJ/c65z/z/jI3ZyabZAKmdnPWgpCR0nhMtwVJ16zSuYjSdrk3FlTlGCxfbUiY6xlt0 HqZ8L9aYu/YLU+8l6HEBa+Outeyt5bpt6WPn/B1A6+qe06Ozs9qazLLK6cm8Eppm2UAy xLqkdMKcHrxUSiBrZzXjctZbreZU8qOQj8jdAjbo9Tnpj3i0oxBU6jCdT0F0fCRQ3SL/ gVBhO93+NWKOdRH9tig80hdAN9xiC8CirwR2o9BUxXl5IAmZ7t2apHauxFvpVWygMrKl xCQQ== 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 :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=WagFcWH/29C3fN0NykaecEwuy8Voop00PS9FlFaEc5Y=; b=VAhvgj49GaQoLlv7RakRdcWymc6UgiTp5Zquu+yi1T/2ksbqnhaJ4fesoPQ2Z4veni eE9l5tVHGQlRkut1KZeWRrtyHtAS0KRdk1FmGzoKCzPV6C7MaVEiEq+R+BPkZgcrMEWV 0TeaW9EBgGjsZ41eqQvrwoFQ+dq+6649uL4eidYTfaiUs4JEk7Ipkdm+6OXDeDoC9Uk1 TG3Thg7t4GsW9XmoFaPPhBoh6eilc8ypPYuV9qn/7PgPnvonwSfsWB41Nh2UoVI12H6h Bg/Yk3JqjI/xrBVebLlysKlTzBLeYQNPYK29xK/XQlnA7XsbB9QFzgZ3uy6rPKXxbfhZ 98wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ISITD6RE; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb9-20020a170907160900b008546dff75e0si1478571ejc.901.2023.01.10.04.41.20; Tue, 10 Jan 2023 04:41:40 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=ISITD6RE; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234969AbjAJM0F (ORCPT + 65 others); Tue, 10 Jan 2023 07:26:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238551AbjAJMZZ (ORCPT ); Tue, 10 Jan 2023 07:25:25 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 088BDCC1 for ; Tue, 10 Jan 2023 04:25:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AF74AB8159E for ; Tue, 10 Jan 2023 12:25:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F064CC433EF; Tue, 10 Jan 2023 12:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673353511; bh=pQwKNKpoYxfyOYyA77pv++Up4PIdhs6brRmSfFIGtU0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ISITD6RE2QyOVyjBTuIxcB4IQ7u1cI0t8rTv+BmKm0gbA3UaQBmtNK1gMAobar+IK I1C7lXDrZ9W2RTuGjZqSS4uGqhDG7Bd5CdNQ0GzCabG83UXx8QWjLbDEAmcMC1GuAe JKe0TkRXlGuvBEfeIzmf55XENfO6rkRnwv/DCG+pE+rHNRWQFKUWTSnscHOmj1f5za FvZ0hWdpRLa5dY0SHWQXG3USYMDPZNOmMv0DT4doTc5cViKTJNuxD9YxjKxt4nISi+ wsGk+d3bNqWi8OaAd4+Mfqi26H4xiNhbhOKB+mnF6PgyR1Y8rsAy7eO6It9rYw+ASG CGz0fMduSmDcQ== From: Kalle Valo To: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= Cc: Minsuk Kang , linux-wireless@vger.kernel.org, dokyungs@yonsei.ac.kr, jisoo.jang@yonsei.ac.kr Subject: Re: [PATCH v2] ath9k: Fix potential stack-out-of-bounds write in ath9k_wmi_rsp_callback() References: <20230104124130.10996-1-linuxlovemin@yonsei.ac.kr> <87zgay1ho0.fsf@toke.dk> Date: Tue, 10 Jan 2023 14:25:06 +0200 In-Reply-To: <87zgay1ho0.fsf@toke.dk> ("Toke \=\?utf-8\?Q\?H\=C3\=B8iland-J\?\= \=\?utf-8\?Q\?\=C3\=B8rgensen\=22's\?\= message of "Wed, 04 Jan 2023 15:46:39 +0100") Message-ID: <87ilhefufx.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Toke H=C3=B8iland-J=C3=B8rgensen writes: > Minsuk Kang writes: > >> Fix a stack-out-of-bounds write that occurs in a WMI response callback >> function that is called after a timeout occurs in ath9k_wmi_cmd(). >> The callback writes to wmi->cmd_rsp_buf, a stack-allocated buffer that >> could no longer be valid when a timeout occurs. Set wmi->last_seq_id to >> 0 when a timeout occurred. >> >> Found by a modified version of syzkaller. >> >> BUG: KASAN: stack-out-of-bounds in ath9k_wmi_ctrl_rx >> Write of size 4 >> Call Trace: >> memcpy >> ath9k_wmi_ctrl_rx >> ath9k_htc_rx_msg >> ath9k_hif_usb_reg_in_cb >> __usb_hcd_giveback_urb >> usb_hcd_giveback_urb >> dummy_timer >> call_timer_fn >> run_timer_softirq >> __do_softirq >> irq_exit_rcu >> sysvec_apic_timer_interrupt >> >> Signed-off-by: Minsuk Kang > > Acked-by: Toke H=C3=B8iland-J=C3=B8rgensen > > Also (Kalle, I assume you can just add this): > > Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.") Yes, will add. --=20 https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatc= hes