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: <1243843851.2327.7.camel@system>
Date:	Mon, 01 Jun 2009 13:40:51 +0530
From:	vibi sreenivasan <vibi_sreenivasan@....com>
To:	Jiri Slaby <jirislaby@...il.com>
Cc:	Mimi Zohar <zohar@...ibm.com>, Kylene Hall <kylene@...ibm.com>,
	Serge Hallyn <serue@...ibm.com>,
	Reiner Sailer <sailer@...son.ibm.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH]:Return proper error value on failure of dentry_open


hi,
	thanks for pointing that out.
> >  out:
> >  	mutex_unlock(&iint->mutex);
> > -	if (file)
> > +	if (IS_ERR(file))
> >  		fput(file);
extremely sorry it was 
	if(!IS_ERR(file))
		fput(file);
i will send that patch again

> 
> This makes no sense at all. If it is IS_ERR, i.e. some negative value,
> you don't want to pass it to fput. 'if (file)' was perfectly correct.
	if(file) is true for file != 0 , ie even if file is a -ve error
	value.
	so while fput dereference file ,this can cause a bug to be
	triggered.
	I actually had one.

Thanks & regards
vibi sreenivasan
> 


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