From: Simon Horman <horms@kernel.org>
To: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Saeed Mahameed <saeed@kernel.org>, Gal Pressman <gal@nvidia.com>,
Dragos Tatulea <dtatulea@nvidia.com>,
David Laight <David.Laight@aculab.com>
Subject: Re: [PATCH net v1 2/2] net/mlx5e: Correct snprintf truncation handling for fw_version buffer used by representors
Date: Fri, 24 Nov 2023 11:40:11 +0000 [thread overview]
Message-ID: <20231124114011.GO50352@kernel.org> (raw)
In-Reply-To: <20231121230022.89102-2-rrameshbabu@nvidia.com>
On Tue, Nov 21, 2023 at 03:00:22PM -0800, Rahul Rameshbabu wrote:
> snprintf returns the length of the formatted string, excluding the trailing
> null, without accounting for truncation. This means that is the return
> value is greater than or equal to the size parameter, the fw_version string
> was truncated.
>
> Link: https://docs.kernel.org/core-api/kernel-api.html#c.snprintf
> Fixes: 1b2bd0c0264f ("net/mlx5e: Check return value of snprintf writing to fw_version buffer for representors")
> Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2023-11-24 11:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 23:00 [PATCH net v1 1/2] net/mlx5e: Correct snprintf truncation handling for fw_version buffer Rahul Rameshbabu
2023-11-21 23:00 ` [PATCH net v1 2/2] net/mlx5e: Correct snprintf truncation handling for fw_version buffer used by representors Rahul Rameshbabu
2023-11-24 11:40 ` Simon Horman [this message]
2023-11-24 11:39 ` [PATCH net v1 1/2] net/mlx5e: Correct snprintf truncation handling for fw_version buffer Simon Horman
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=20231124114011.GO50352@kernel.org \
--to=horms@kernel.org \
--cc=David.Laight@aculab.com \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rrameshbabu@nvidia.com \
--cc=saeed@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.