kern/85268: NFS statfs corruption
Sten Spans
sten at blinkenlights.nl
Wed Aug 24 15:50:08 GMT 2005
>Number: 85268
>Category: kern
>Synopsis: NFS statfs corruption
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 24 15:50:07 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Sten Spans
>Release: 5.4-RELEASE-p1
>Organization:
Blinkenlights.nl
>Environment:
FreeBSD www1.enrtd.nl.easynet.net 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #7: Fri May 20 10:19:10 CEST 2005 root at www1.enrtd.nl.easynet.net:/usr/obj/usr/src/sys/WWW i386
>Description:
Specifying the mount_nfs -r option causes an nfsmount to get
MNT_NOEXEC in statfs f_flags. This causes quite a few problems.
Please note that the mount is nog actually noexec, it just
has the bit set in f_flags.
>How-To-Repeat:
I used the following test prog:
#include <stdlib.h>
#include <sys/param.h>
#include <sys/mount.h>
int main(int argc, char **argv) {
struct statfs fs;
if (statfs(argv[1], &fs) != 0)
exit(EXIT_FAILURE);
if (fs.f_flags & MNT_NOEXEC) {
printf("noexec\n");
} else {
printf("exec\n");
}
}
www1# gcc -o noexec noexec.c
www1# mount nfs3:/export/vol1/build/BUILDROOT-WWW /buildroot
www1# ./noexec /buildroot/
exec
www1# umount /buildroot/
www1# mount -o -r=32768 nfs3:/export/vol1/build/BUILDROOT-WWW /buildroot
www1# ./noexec /buildroot/
noexec
>Fix:
this probably is a kernel problem.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list