All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: "Jérôme Pouiller" <jerome.pouiller@silabs.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] wfx: prevent underflow in wfx_send_pds()
Date: Mon, 29 Aug 2022 19:03:38 +0300	[thread overview]
Message-ID: <87a67ndokl.fsf@kernel.org> (raw)
In-Reply-To: <2729343.a3EqFhE7eK@pc-42> ("Jérôme Pouiller"'s message of "Mon, 22 Aug 2022 14:20:53 +0200")

Jérôme Pouiller <jerome.pouiller@silabs.com> writes:

> On Friday 19 August 2022 07:23:43 CEST Dan Carpenter wrote:
>> This does a "chunk_len - 4" subtraction later when it calls:
>> 
>>         ret = wfx_hif_configuration(wdev, buf + 4, chunk_len - 4);
>> 
>> so check for "chunk_len" is less than 4.
>
> This patch also ensures that buf[4] won't overflow during:
>
>     if (buf[4] != '{' || buf[chunk_len - 1] != '}')
>     	dev_warn(wdev->dev, "PDS:%d: unexpected content\n", chunk_num);
>
>> Fixes: dcbecb497908 ("staging: wfx: allow new PDS format")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

BTW Jérôme, as you are the driver maintainer you can use Acked-by.

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

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

  reply	other threads:[~2022-08-29 16:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  5:23 [PATCH] wfx: prevent underflow in wfx_send_pds() Dan Carpenter
2022-08-22 12:20 ` Jérôme Pouiller
2022-08-29 16:03   ` Kalle Valo [this message]
2022-08-29 17:12     ` Jérôme Pouiller
2022-09-01 10:33       ` Kalle Valo
2022-09-02  8:44 ` wifi: " 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=87a67ndokl.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=jerome.pouiller@silabs.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.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.