From: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
To: Artem Dinaburg <artem@trailofbits.com>, stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>, Kalle Valo <kvalo@kernel.org>,
Jeff Johnson <jjohnson@kernel.org>,
Jeff Johnson <jeff.johnson@oss.qualcomm.com>,
Vasanthakumar Thiagarajan
<vasanthakumar.thiagarajan@oss.qualcomm.com>,
ath12k@lists.infradead.org, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6.6.y 2/2] wifi: ath12k: copy M3 firmware when reusing the buffer
Date: Thu, 15 Oct 2026 15:38:30 +0800 [thread overview]
Message-ID: <bc760367-4896-4626-8f5b-1bc3ef6cba22@oss.qualcomm.com> (raw)
In-Reply-To: <20261012165925.32575-3-artem@trailofbits.com>
On 10/13/2026 12:59 AM, Artem Dinaburg wrote:
> This fixes my 6.6.y backport of upstream commit 05090ae82f44 ("wifi:
> ath12k: check M3 buffer size as well whey trying to reuse it"). There is
> no corresponding upstream commit, because upstream never had this bug.
>
> When the existing M3 buffer is large enough for the new m3.bin, my
> backport releases the firmware and returns early. The new image is never
> copied, and m3_mem->size keeps the old length. Upstream instead jumps to
> skip_m3_alloc, which copies the current image into the existing buffer
> and records its length. As a result, after recovery or resume, 6.6.y
> gives the firmware the previous M3 image whenever the new one is the
> same size or smaller. A larger image is reallocated and loaded.
>
> Replace the early return with the upstream goto skip_m3_alloc. The
> previous patch, a backport of upstream commit 00575bb44b2c ("wifi:
> ath12k: fix reusing m3 memory"), keeps the allocation size in
> total_size. So copying a smaller image no longer changes the size passed
> to dma_free_coherent().
>
> Fixes: 9a38ba5561d9 ("wifi: ath12k: check M3 buffer size as well whey trying to reuse it")
> Assisted-by: LLM
> Signed-off-by: Artem Dinaburg <artem@trailofbits.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
next prev parent reply other threads:[~2026-10-15 7:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 16:59 [PATCH 6.6.y 0/2] wifi: ath12k: fix M3 buffer reuse in my CVE-2024-40979 backport Artem Dinaburg
2026-10-12 16:59 ` [PATCH 6.6.y 1/2] wifi: ath12k: fix reusing m3 memory Artem Dinaburg
2026-10-12 16:59 ` [PATCH 6.6.y 2/2] wifi: ath12k: copy M3 firmware when reusing the buffer Artem Dinaburg
2026-10-14 1:27 ` Sasha Levin
2026-10-15 7:38 ` Baochen Qiang [this message]
2026-10-15 19:36 ` Sasha Levin
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=bc760367-4896-4626-8f5b-1bc3ef6cba22@oss.qualcomm.com \
--to=baochen.qiang@oss.qualcomm.com \
--cc=artem@trailofbits.com \
--cc=ath12k@lists.infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=vasanthakumar.thiagarajan@oss.qualcomm.com \
/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
all inboxes | Powered by JetHome®