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:	Sun, 12 Nov 2006 10:58:47 -0500
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Adrian Bunk <bunk@...sta.de>
Cc:	neilb@....unsw.edu.au, nfs@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [NFS] [RFC: 2.6 patch] include/linux/nfsd/nfsfh.h: fix a NULL

On Sun, 2006-11-12 at 14:17 +0100, Adrian Bunk wrote:
> dereference
> Reply-To: 
> Fcc: =sent-mail
> 
> When we know fhp->fh_dentry is NULL, a code path where it's being 
> dereferenced isn't a good choice.
> 
> Spotted by the coverity checker.
> 
> Signed-off-by: Adrian Bunk <bunk@...sta.de>
> 
> --- linux-2.6/include/linux/nfsd/nfsfh.h.old	2006-11-12 14:13:34.000000000 +0100
> +++ linux-2.6/include/linux/nfsd/nfsfh.h	2006-11-12 14:13:49.000000000 +0100
> @@ -330,8 +330,7 @@ fh_unlock(struct svc_fh *fhp)
>  {
>  	if (!fhp->fh_dentry)
>  		printk(KERN_ERR "fh_unlock: fh not verified!\n");
> -
> -	if (fhp->fh_locked) {
> +	else if (fhp->fh_locked) {
>  		fill_post_wcc(fhp);
>  		mutex_unlock(&fhp->fh_dentry->d_inode->i_mutex);
>  		fhp->fh_locked = 0;
> 

This issue has come up on lkml before. Please just convert that check
for fhp->fh_dentry into a BUG_ON().

Trond

-
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