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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 26 Sep 2011 11:02:26 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	James Bottomley <James.Bottomley@...senPartnership.com>
Cc:	Dan Carpenter <dan.carpenter@...cle.com>, netdev@...r.kernel.org,
	linux-scsi@...r.kernel.org
Subject: Re: [SCSI] cxgb3i: convert cdev->l2opt to use rcu to prevent NULL
 dereference (v2)

On Mon, Sep 26, 2011 at 09:31:15AM -0500, James Bottomley wrote:
> On Mon, 2011-09-26 at 10:20 -0400, Neil Horman wrote:
> > On Mon, Sep 26, 2011 at 04:40:48PM +0300, Dan Carpenter wrote:
> > > Hi Neil,
> > > 
> > > c98bc57ee65b6 "[SCSI] cxgb3i: convert cdev->l2opt to use rcu to
> > > prevent NULL dereference (v2)" from linux-next introduces a usinging
> > > uninitialized variable bug.
> > > 
> > >  struct l2t_entry *t3_l2t_get(struct t3cdev *cdev, struct neighbour *neigh,
> > >                              struct net_device *dev)
> > >  {
> > > -       struct l2t_entry *e;
> > > -       struct l2t_data *d = L2DATA(cdev);
> > > +       struct l2t_entry *e = NULL;
> > > +       struct l2t_data *d;
> > >         u32 addr = *(u32 *) neigh->primary_key;
> > >         int ifidx = neigh->dev->ifindex;
> > >         int hash = arp_hash(addr, ifidx, d);
> > >                                          ^
> > > Uninitialized variable.
> > > 
> > >         struct port_info *p = netdev_priv(dev);
> > >         int smt_idx = p->port_id;
> > >  
> > > +       rcu_read_lock();
> > > +       d = L2DATA(cdev);
> > > +       if (!d)
> > > +               goto done_rcu;
> > > +
> > > 
> > > regards,
> > > dan carpenter
> > > 
> > 
> > Yup, thanks, you need this to9 fix the uninitalized var.
> 
> I rolled this into the original.
> 
Thank you!
Neil

> James
> 
> 
> 
--
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