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: Workaround for NFS filehandle bug. Message-ID: <199703070713.CAA02781@big-O.math.psu.edu>
index | next in thread | raw e-mail
>Submitter-Id: current-users
>Originator: Dan Cross
>Organization: Penn State University
>Confidential: no
>Synopsis: Fix for the NFS filehandle bug.
>Severity: critical
>Priority: high
>Category: kern
>Release: FreeBSD 3.0-CURRENT i386
>Class: change-request
>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;
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703070713.CAA02781>
