From: Jakub Kicinski <kuba@kernel.org>
To: Jay Vosburgh <jay.vosburgh@canonical.com>
Cc: 'Simon Horman' <horms@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Andy Gospodarek <andy@greyhouse.net>,
Ding Tianhong <dingtianhong@huawei.com>,
Hangbin Liu <liuhangbin@gmail.com>,
Sam Sun <samsun1006219@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net v5] bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set()
Date: Mon, 1 Jul 2024 19:59:08 -0700 [thread overview]
Message-ID: <20240701195908.06f8edc3@kernel.org> (raw)
In-Reply-To: <1623861.1719875266@famine>
On Mon, 01 Jul 2024 16:07:46 -0700 Jay Vosburgh wrote:
> > if (strlen(newval->string) < 1 ||
>
> I find the second option clearer, FWIW. This isn't in a hot
> path, and including strlen() in there makes it more obvious to my
> reading what the intent is. The size_t return from strlen() is
> unsigned, so we really want to test the return value for zero-ness.
True, I picked < 1 because the line below offsets by 1.
Either way is fine, but lets make sure we drop the parenthesis.
next prev parent reply other threads:[~2024-07-02 2:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-30 13:20 [PATCH net v5] bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set() 'Simon Horman'
2024-06-30 18:20 ` Jay Vosburgh
2024-07-01 0:57 ` Hangbin Liu
2024-07-01 21:32 ` Jakub Kicinski
2024-07-01 23:07 ` Jay Vosburgh
2024-07-02 2:59 ` Jakub Kicinski [this message]
2024-07-02 13:44 ` 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=20240701195908.06f8edc3@kernel.org \
--to=kuba@kernel.org \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=dingtianhong@huawei.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jay.vosburgh@canonical.com \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=samsun1006219@gmail.com \
/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.