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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100522065212.GW8301@sequoia.sous-sol.org>
Date:	Fri, 21 May 2010 23:52:12 -0700
From:	Chris Wright <chrisw@...s-sol.org>
To:	David Howells <dhowells@...hat.com>
Cc:	netdev@...r.kernel.org, Chris Wright <chrisw@...s-sol.org>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] rtnetlink: Fix error handling in do_setlink()

* David Howells (dhowells@...hat.com) wrote:
> Commit c02db8c6290bb992442fec1407643c94cc414375:
> 
> 	Author:  Chris Wright <chrisw@...s-sol.org>
> 	Date:    Sun May 16 01:05:45 2010 -0700
> 	Subject: rtnetlink: make SR-IOV VF interface symmetric
> 
> adds broken error handling to do_setlink() in net/core/rtnetlink.c.  The
> problem is the following chunk of code:
> 
> 	if (tb[IFLA_VFINFO_LIST]) {
> 		struct nlattr *attr;
> 		int rem;
> 		nla_for_each_nested(attr, tb[IFLA_VFINFO_LIST], rem) {
> 			if (nla_type(attr) != IFLA_VF_INFO)
>   ---->				goto errout;
> 			err = do_setvfinfo(dev, attr);
> 			if (err < 0)
> 				goto errout;
> 			modified = 1;
> 		}
> 	}
> 
> which can get to errout without setting err, resulting in the following error:
> 
> net/core/rtnetlink.c: In function 'do_setlink':
> net/core/rtnetlink.c:904: warning: 'err' may be used uninitialized in this function
> 
> Change the code to return -EINVAL in this case.  Note that this might not be
> the appropriate error though.
> 
> Signed-off-by: David Howells <dhowells@...hat.com>

Acked-by: Chris Wright <chrisw@...s-sol.org>

Thank you David, that's correct.  I have some other pending changes
here, so I don't mind collecting them together.

thanks,
-chris
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ