From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Jiaxin Li <18135327133@163.com>
Cc: linux-wpan@vger.kernel.org
Subject: Re: [PATCH] ieee802154: ca8210: validate received command lengths
Date: Tue, 20 Oct 2026 10:56:57 +0200 [thread overview]
Message-ID: <87jyncu4va.fsf@bootlin.com> (raw)
In-Reply-To: <20261019115400.459-1-18135327133@163.com> (Jiaxin Li's message of "Mon, 19 Oct 2026 19:54:00 +0800")
On 19/10/2026 at 19:54:00 +08, Jiaxin Li <18135327133@163.com> wrote:
> ca8210_rx_done() computes len from buf[1] but only checks the upper
> bound against CA8210_SPI_BUF_SIZE. The code then reads command bytes
> that are not guaranteed to be present: buf[3] for MCPS-DATA.confirm and
> buf[2] for the HWME wakeup indication. ca8210_net_rx() similarly reads
> command[26] for MCPS-DATA.indication and command[3] for
> MCPS-DATA.confirm without a lower-bound check.
>
> Add the missing per-command length checks and drop or ignore short
> messages.
>
> Signed-off-by: Jiaxin Li <18135327133@163.com>
You are making totally arbitrary bound checks. Yes these checks may be
relevant, but please go beyond the very single array access that your LLM
saw and try to make sense out of what is done in the driver. Then
propose meaningful checks.
Thanks,
Miquèl
next prev parent reply other threads:[~2026-10-20 8:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 11:54 [PATCH] ieee802154: ca8210: validate received command lengths Jiaxin Li
2026-10-20 8:56 ` Miquel Raynal [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-20 12:09 Jiaxin Li
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=87jyncu4va.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=18135327133@163.com \
--cc=linux-wpan@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