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, 12 Nov 2012 10:03:37 -0800
From:	Sarah Sharp <sarah.a.sharp@...ux.intel.com>
To:	Julius Werner <jwerner@...gle.com>
Cc:	Andy Shevchenko <andy.shevchenko@...il.com>,
	Julius Werner <jwerner@...omium.org>,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Vincent Palatin <vpalatin@...omium.org>
Subject: Re: [PATCH] xhci: fix null-pointer dereference when destroying
 half-built segment rings

On Thu, Nov 01, 2012 at 01:28:46PM -0700, Julius Werner wrote:
> >> Is it just
> >> for (prev = *first; prev; prev = prev->next)
> >>    xhci_segment_free(xhci, prev);
> >> 
> >> ?
> > 
> > Yeah, that seems cleaner.
> > 
> > Sarah Sharp
> 
> I can submit it that way if you want, but I would advise against it. This way you access the prev pointer after it has been freed already… that's probably not a problem in the current kernel, but it depends on how the underlying memory is managed and is generally just not a good idea in my opinion.

Yep, you're right.  I'll take the second patch you submitted, thanks.

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ