From: "Jérôme Pouiller" <jerome.pouiller@silabs.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] wfx: prevent underflow in wfx_send_pds()
Date: Mon, 22 Aug 2022 14:20:53 +0200 [thread overview]
Message-ID: <2729343.a3EqFhE7eK@pc-42> (raw)
In-Reply-To: <Yv8eX7Xv2ubUOvW7@kili>
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>
--
Jérôme Pouiller
next prev parent reply other threads:[~2022-08-22 12:21 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 [this message]
2022-08-29 16:03 ` Kalle Valo
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=2729343.a3EqFhE7eK@pc-42 \
--to=jerome.pouiller@silabs.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@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 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).