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: <a309f7fb5b2c5a4941c330b975b8b4c698ea3258.camel@cisco.com>
Date:   Mon, 18 Jun 2018 01:54:33 +0000
From:   "Govindarajulu Varadarajan (gvaradar)" <gvaradar@...co.com>
To:     "ben.hutchings@...ethink.co.uk" <ben.hutchings@...ethink.co.uk>
CC:     "alexander.levin@...rosoft.com" <alexander.levin@...rosoft.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Christian Benvenuti (benve)" <benve@...co.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "Ravi Anand (ravianan)" <ravianan@...co.com>
Subject: Re: [PATCH 4.4 234/268] enic: enable rq before updating rq
 descriptors

On Mon, 2018-06-18 at 00:06 +0100, Ben Hutchings wrote:
> On Mon, 2018-05-28 at 12:03 +0200, Greg Kroah-Hartman wrote:
> > 4.4-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Govindarajulu Varadarajan <gvaradar@...co.com>
> > 
> > [ Upstream commit e8588e268509292550634d9a35f2723a207683b2 ]
> 
> [...]
> > --- a/drivers/net/ethernet/cisco/enic/enic_main.c
> > +++ b/drivers/net/ethernet/cisco/enic/enic_main.c
> 
> [...]
> > @@ -1765,8 +1765,12 @@ static int enic_open(struct net_device *
> > >  	return 0;
> > 
> >  
> >  err_out_free_rq:
> > -	for (i = 0; i < enic->rq_count; i++)
> > +	for (i = 0; i < enic->rq_count; i++) {
> > +		err = vnic_rq_disable(&enic->rq[i]);
> > +		if (err)
> > +			return err;
> 
> This added code is wrong: it overwrites the error code that was
> previously in err.  If vnic_rq_disable() succeeds, enic_open() will
> wrongly return 0.  If vnic_rq_disable() fails, I still don't think it
> makes sense to skip the remaining cleanup actins.

Good catch. Fixing it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ