netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jay Vosburgh <j.vosburgh@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>,
	Ding Tianhong <dingtianhong@huawei.com>,
	Sam Sun <samsun1006219@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net v4] bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set()
Date: Fri, 19 Apr 2024 14:48:11 +0100	[thread overview]
Message-ID: <20240419134811.GC3975545@kernel.org> (raw)
In-Reply-To: <ZiJpfZQb_yA936Wh@Laptop-X1>

On Fri, Apr 19, 2024 at 08:54:21PM +0800, Hangbin Liu wrote:
> On Fri, Apr 19, 2024 at 12:08:25PM +0100, 'Simon Horman' wrote:

...

> > diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
> > index 0cacd7027e35..64a06e3399ee 100644
> > --- a/drivers/net/bonding/bond_options.c
> > +++ b/drivers/net/bonding/bond_options.c
> > @@ -1214,9 +1214,9 @@ static int bond_option_arp_ip_targets_set(struct bonding *bond,
> >  	__be32 target;
> >  
> >  	if (newval->string) {
> > -		if (!in4_pton(newval->string+1, -1, (u8 *)&target, -1, NULL)) {
> > -			netdev_err(bond->dev, "invalid ARP target %pI4 specified\n",
> > -				   &target);
> > +		if (!(strlen(newval->string)) ||
> > +		    !in4_pton(newval->string + 1, -1, (u8 *)&target, -1, NULL)) {
> > +			netdev_err(bond->dev, "invalid ARP target I4 specified\n");
> 
> Hi Simon, the error message should be "invalid ARP target specified\n"

Thanks,

I'll send an update after waiting a suitable time for review.

--- 
pw-bot: changes-requested

      reply	other threads:[~2024-04-19 13:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 11:08 [PATCH net v4] bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set() 'Simon Horman'
2024-04-19 12:54 ` Hangbin Liu
2024-04-19 13:48   ` Simon Horman [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=20240419134811.GC3975545@kernel.org \
    --to=horms@kernel.org \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=dingtianhong@huawei.com \
    --cc=edumazet@google.com \
    --cc=j.vosburgh@gmail.com \
    --cc=kuba@kernel.org \
    --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 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).