From: Vincent Mailhol <mailhol@kernel.org>
To: James Gao <jamesgao5@outlook.com>, mkl@pengutronix.de
Cc: linux-can@vger.kernel.org, s.grosjean@peak-system.fr,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] can: peak_usb: Add bounds check for USB channel index
Date: Mon, 25 May 2026 14:44:01 +0200 [thread overview]
Message-ID: <3e72919d-564a-4171-85f7-82ffddbc5b5b@kernel.org> (raw)
In-Reply-To: <TYWPR01MB8559DBAAAA6A7F410400329CF0012@TYWPR01MB8559.jpnprd01.prod.outlook.com>
On 20/05/2026 at 07:40, James Gao wrote:
> The channel control index ctrl_idx is derived from rx->len which comes
> directly from a device USB payload. The mask 0x0f allows values 0-15,
> but the array size of usb_if->dev[] is only 2. Values 2-15 cause heap
> out-of-bounds read, eventually causing kernel panic in the IRQ context.
>
> Add bounds checking for ctrl_idx before the array access in both
> pcan_usb_pro_handle_canmsg() and pcan_usb_pro_handle_error().
>
> Fixes: d8a199355f8f ("can: usb: PEAK-System Technik PCAN-USB Pro specific part")
> Signed-off-by: James Gao <jamesgao5@outlook.com>
Thanks,
Reviewed-by: Vincent Mailhol <mailhol@kernel.org>
Yours sincerely,
Vincent Mailhol
prev parent reply other threads:[~2026-05-25 12:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 9:51 [PATCH v2] can: peak_usb: Add bounds check for USB channel index James Gao
2026-05-15 10:04 ` Stéphane Grosjean
2026-05-15 11:34 ` Vincent Mailhol
2026-05-20 5:40 ` [PATCH v3] " James Gao
2026-05-25 12:44 ` Vincent Mailhol [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=3e72919d-564a-4171-85f7-82ffddbc5b5b@kernel.org \
--to=mailhol@kernel.org \
--cc=jamesgao5@outlook.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=s.grosjean@peak-system.fr \
/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