From: Kalle Valo <kvalo@kernel.org>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Minsuk Kang <linuxlovemin@yonsei.ac.kr>,
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()
Date: Tue, 10 Jan 2023 14:25:06 +0200 [thread overview]
Message-ID: <87ilhefufx.fsf@kernel.org> (raw)
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")
Toke Høiland-Jørgensen <toke@toke.dk> writes:
> Minsuk Kang <linuxlovemin@yonsei.ac.kr> 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 <linuxlovemin@yonsei.ac.kr>
>
> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
>
> Also (Kalle, I assume you can just add this):
>
> Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.")
Yes, will add.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2023-01-10 12:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 12:41 [PATCH v2] ath9k: Fix potential stack-out-of-bounds write in ath9k_wmi_rsp_callback() Minsuk Kang
2023-01-04 14:46 ` Toke Høiland-Jørgensen
2023-01-10 12:25 ` Kalle Valo [this message]
2023-01-17 11:54 ` Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilhefufx.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=dokyungs@yonsei.ac.kr \
--cc=jisoo.jang@yonsei.ac.kr \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxlovemin@yonsei.ac.kr \
--cc=toke@toke.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).