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]
Date:	Tue, 09 Oct 2007 11:27:57 -0400
From:	Trond Myklebust <Trond.Myklebust@...app.com>
To:	Greg KH <gregkh@...e.de>
Cc:	Roel Kluin <12o3l@...cali.nl>, linux-kernel@...r.kernel.org,
	stable@...nel.org, Justin Forbes <jmforbes@...uxtx.org>,
	Zwane Mwaikambo <zwane@....linux.org.uk>,
	"Theodore Ts'o" <tytso@....edu>,
	Randy Dunlap <rdunlap@...otime.net>,
	Dave Jones <davej@...hat.com>,
	Chuck Wolber <chuckw@...ntumlinux.com>,
	Chris Wedgwood <reviews@...cw.f00f.org>,
	Michael Krufky <mkrufky@...uxtv.org>,
	Chuck Ebbert <cebbert@...hat.com>,
	Domenico Andreoli <cavokz@...il.com>,
	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	alan@...rguk.ukuu.org.uk
Subject: Re: [patch 08/12] NLM: Fix a circular lock dependency in lockd


On Tue, 2007-10-09 at 08:13 -0700, Greg KH wrote:
> On Tue, Oct 09, 2007 at 11:00:28AM -0400, Trond Myklebust wrote:
> > 
> > On Mon, 2007-10-08 at 22:01 +0200, Roel Kluin wrote:
> > > Greg KH wrote:
> > > 
> > > @@ -477,10 +479,15 @@ nlmsvc_testlock(struct svc_rqst *rqstp, 
> > >  
> > >  	if (block == NULL) {
> > >  		struct file_lock *conf = kzalloc(sizeof(*conf), GFP_KERNEL);
> > > +		struct nlm_host	*host;
> > >  
> > >  		if (conf == NULL)
> > >  			return nlm_granted;
> > > -		block = nlmsvc_create_block(rqstp, file, lock, cookie);
> > > +		/* Create host handle for callback */
> > > +		host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
> > > +		if (host == NULL)
> > > +			return nlm_lck_denied_nolocks;
> > > +		block = nlmsvc_create_block(rqstp, host, file, lock, cookie);
> > >  		if (block == NULL) {
> > >  			kfree(conf);
> > >  			return nlm_granted;
> > > 
> > > To be frankly I don't know what this is about, but shouldn't conf be freed if host == NULL?
> > 
> > Thanks for spotting this!
> > 
> > Greg, should I resend this patch, or would you prefer an incremental
> > fix?
> 
> An incremental one would be best.
> 
> thanks,
> 
> greg k-h

Please see the attachment.

Cheers
  Trond


Download attachment "linux-2.6.23-000-fix_memleak_in_nlmsvc_testlock.dif" of type "message/rfc822" (1142 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ