lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240419134811.GC3975545@kernel.org>
Date: Fri, 19 Apr 2024 14:48:11 +0100
From: Simon Horman <horms@...nel.org>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Jay Vosburgh <j.vosburgh@...il.com>,
	Andy Gospodarek <andy@...yhouse.net>,
	Ding Tianhong <dingtianhong@...wei.com>,
	Sam Sun <samsun1006219@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net v4] bonding: Fix out-of-bounds read in
 bond_option_arp_ip_targets_set()

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ