From: Simon Horman <horms@kernel.org>
To: Peter Seiderer <ps.report@gmx.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Dan Carpenter <dan.carpenter@linaro.org>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH net-next v1 1/2] net: pktgen: add strict buffer parsing index check
Date: Thu, 20 Mar 2025 11:47:28 +0000 [thread overview]
Message-ID: <20250320114728.GL280585@kernel.org> (raw)
In-Reply-To: <20250317090401.1240704-1-ps.report@gmx.net>
On Mon, Mar 17, 2025 at 10:04:00AM +0100, Peter Seiderer wrote:
> Add strict buffer parsing index check to avoid the following Smatch
> warning:
>
> net/core/pktgen.c:877 get_imix_entries()
> warn: check that incremented offset 'i' is capped
>
> Checking the buffer index i after every get_user/i++ step and returning
> with error code immediately avoids the current indirect (but correct)
> error handling.
>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/netdev/36cf3ee2-38b1-47e5-a42a-363efeb0ace3@stanley.mountain/
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-03-20 11:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 9:04 [PATCH net-next v1 1/2] net: pktgen: add strict buffer parsing index check Peter Seiderer
2025-03-17 9:04 ` [PATCH net-next v1 2/2] selftest: net: update proc_net_pktgen (add more imix_weights test cases) Peter Seiderer
2025-03-20 11:48 ` Simon Horman
2025-03-20 11:47 ` Simon Horman [this message]
2025-03-24 19:20 ` [PATCH net-next v1 1/2] net: pktgen: add strict buffer parsing index check patchwork-bot+netdevbpf
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=20250320114728.GL280585@kernel.org \
--to=horms@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ps.report@gmx.net \
--cc=shuah@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).