[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <985111fc-3301-4c0a-a13e-ab65e94bdcbb@linaro.org>
Date: Mon, 21 Jul 2025 13:02:37 +0200
From: Casey Connolly <casey.connolly@...aro.org>
To: Mihai Moldovan <ionic@...ic.de>, linux-arm-msm@...r.kernel.org,
Manivannan Sadhasivam <mani@...nel.org>
Cc: Denis Kenzior <denkenz@...il.com>, Eric Dumazet <edumazet@...gle.com>,
Kuniyuki Iwashima <kuniyu@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Willem de Bruijn <willemb@...gle.com>, "David S . Miller"
<davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Simon Horman <horms@...nel.org>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH v2 01/10] net: qrtr: ns: validate msglen before ctrl_pkt
use
Hi Mihai
On 19/07/2025 20:59, Mihai Moldovan wrote:
> From: Denis Kenzior <denkenz@...il.com>
>
> The qrtr_ctrl_pkt structure is currently accessed without checking
> if the received payload is large enough to hold the structure's fields.
> Add a check to ensure the payload length is sufficient.
>
> Signed-off-by: Denis Kenzior <denkenz@...il.com>
> Reviewed-by: Marcel Holtmann <marcel@...tmann.org>
> Reviewed-by: Andy Gross <agross@...nel.org>
> Signed-off-by: Mihai Moldovan <ionic@...ic.de>
I think this is missing a Fixes: tag?
Kind regards,
>
> ---
>
> v2:
> - rebase against current master
> - use correct size of packet structure as per review comment
> ---
> net/qrtr/ns.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/qrtr/ns.c b/net/qrtr/ns.c
> index 3de9350cbf30..2bcfe539dc3e 100644
> --- a/net/qrtr/ns.c
> +++ b/net/qrtr/ns.c
> @@ -619,6 +619,9 @@ static void qrtr_ns_worker(struct work_struct *work)
> break;
> }
>
> + if ((size_t)msglen < sizeof(*pkt))
> + break;
> +
> pkt = recv_buf;
> cmd = le32_to_cpu(pkt->cmd);
> if (cmd < ARRAY_SIZE(qrtr_ctrl_pkt_strings) &&
--
// Casey (she/her)
Powered by blists - more mailing lists