Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 1997 02:13:57 -0500 (EST)
From:      Dan Cross <tenser@big-O.math.psu.edu>
To:        FreeBSD-gnats-submit@freebsd.org, security@freebsd.org
Subject:   kern/2908: Workaround for NFS filehandle bug.
Message-ID:  <199703070713.CAA02781@big-O.math.psu.edu>
Resent-Message-ID: <199703070720.XAA21793@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2908
>Category:       kern
>Synopsis:       Fix for the NFS filehandle bug.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar  6 23:20:01 PST 1997
>Last-Modified:
>Originator:     Dan Cross
>Organization:
Penn State University
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	This is from 3.0-current, kernel cvsup'ed as of today.

>Description:

	Workaround for the NFS filehandle thingy.  A better solution
	which really randomizes the filehandles would be better.  :-)
	Then again, I shouldn't talk, since I'm not really all that
	familiar with the NFS implementation...

	This is basically what was in the advisory, but in diff format.

>How-To-Repeat:

	See the BoS posting.

>Fix:
	
	*** vfs_vnops.c 1997/02/22 09:39:36     1.30
	--- vfs_vnops.c 1997/03/07 07:07:16
	***************
	*** 411,417 ****
		sb->st_ctimespec = vap->va_ctime;
		sb->st_blksize = vap->va_blocksize;
		sb->st_flags = vap->va_flags;
	!       sb->st_gen = vap->va_gen;
	  #if (S_BLKSIZE == 512)
		/* Optimize this case */
		sb->st_blocks = vap->va_bytes >> 9;
	--- 411,420 ----
		sb->st_ctimespec = vap->va_ctime;
		sb->st_blksize = vap->va_blocksize;
		sb->st_flags = vap->va_flags;
	!       if (suser(p->p_ucred, &p->p_acflag))
	!               sb->st_gen = 0;
	!       else
	!               sb->st_gen = vap->va_gen;
	  #if (S_BLKSIZE == 512)
        /* Optimize this case */
        sb->st_blocks = vap->va_bytes >> 9;

>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703070713.CAA02781>