All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Jeff Johnson <jjohnson@kernel.org>,
	 ath10k@lists.infradead.org, linux-wireless@vger.kernel.org,
	 lvc-project@linuxtesting.org
Subject: Re: [PATCH] wifi: ath10k: perform buffer size check in ath10k_wow_convert_8023_to_80211()
Date: Thu, 09 Jan 2025 15:05:00 +0200	[thread overview]
Message-ID: <87h668dtoj.fsf@kernel.org> (raw)
In-Reply-To: <20241225124710.91238-1-dmantipov@yandex.ru> (Dmitry Antipov's message of "Wed, 25 Dec 2024 15:47:10 +0300")

Dmitry Antipov <dmantipov@yandex.ru> writes:

> Looking through the following:
>
> -> ath10k_vif_wow_set_wakeups()
>    -> ath10k_wow_convert_8023_to_80211()
>       ...
>       memcpy(..., ..., pattern_len);                    [1]
>       ...
>    <- ...
>    if (WARN_ON(...packet_len > WOW_MAX_PATTERN_SIZE))   [2]
>       ...
>
> I've found that [2] makes no sense after [1]. I.e. check for possible
> buffer overflow should be performed prior to touching both 'pattern' and
> 'mask' buffers with 'memcpy()' in 'ath10k_wow_convert_8023_to_80211()'.
> Compile tested only.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>

This code path should be tested on a real device, can anyone help with
that?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


      reply	other threads:[~2025-01-09 13:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-25 12:47 [PATCH] wifi: ath10k: perform buffer size check in ath10k_wow_convert_8023_to_80211() Dmitry Antipov
2025-01-09 13:05 ` Kalle Valo [this message]

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=87h668dtoj.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath10k@lists.infradead.org \
    --cc=dmantipov@yandex.ru \
    --cc=jjohnson@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.