From hhui@disperse.arcfour.com  Sun Dec 29 01:41:16 1996
Received: from disperse.arcfour.com (disperse.arcfour.com [207.176.50.17])
          by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id BAA21516
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 29 Dec 1996 01:41:15 -0800 (PST)
Received: (from hhui@localhost)
  by disperse.arcfour.com (ArcFour-8.8.3) id EAA15097;
  ; Sun, 29 Dec 1996 04:41:33 -0500 (EST)
Message-Id: <199612290941.EAA15097@disperse.arcfour.com>
Date: Sun, 29 Dec 1996 04:41:33 -0500 (EST)
From: Hui-Hui Hu <hhui@arcfour.com>
Reply-To: hhui@arcfour.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: tail segfaults on NFS permission denied
X-Send-Pr-Version: 3.2

>Number:         2315
>Category:       bin
>Synopsis:       tail segfaults on NFS permission denied
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    peter
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 29 01:50:02 PST 1996
>Closed-Date:    Mon Dec 27 18:48:52 PST 1999
>Last-Modified:  Mon Dec 27 18:49:09 PST 1999
>Originator:     Hui-Hui Hu
>Release:        FreeBSD 2.2-ALPHA i386
>Organization:
Arc Four
>Environment:

NFS client mounting partition with "nosuid" option

>Description:

on an NFS client mounting a partition with the nosuid option,
tail(1), if run as root, segfaults with the following kernel log messages:

Dec 28 10:41:38 watermark /kernel: vnode_pager_getpages: I/O read error
Dec 28 10:41:38 watermark /kernel: vm_fault: pager input (probably hardware) error, PID 15308 failure
Dec 28 10:41:38 watermark /kernel: pid 15308 (tail), uid 0: exited on signal 11

shouldn't it be more robust than this?

>How-To-Repeat:

client# mount -t nfs -o nosuid server:/foo /foo
client# tail /foo/filename
Segmentation fault

>Fix:
	

>Release-Note:
>Audit-Trail:

From: J Wunsch <j@uriah.heep.sax.de>
To: hhui@arcfour.com
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: bin/2315: tail segfaults on NFS permission denied
Date: Mon, 30 Dec 1996 16:50:53 +0100 (MET)

 As Hui-Hui Hu wrote:
 
 > client# mount -t nfs -o nosuid server:/foo /foo
 > client# tail /foo/filename
 > Segmentation fault
 
 What's up with your environment?  
 
 uriah # mount localhost:/tmp /mnt
 uriah # umount /mnt
 uriah # mount -o nosuid localhost:/tmp /mnt
 uriah # tail /mnt/makefile
 SYSTEM := $(shell uname -s)
 
 all:
         echo $(SYSTEM)
 uriah # umount /mnt
 
 > /kernel: vnode_pager_getpages: I/O read error
 > /kernel: vm_fault: pager input (probably hardware) error, PID 15308 failure
 > /kernel: pid 15308 (tail), uid 0: exited on signal 11
 
 That seems to be the culprit.  Is your filesystem the `tail' came from
 also NFS?
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)
Responsible-Changed-From-To: freebsd-bugs->peter 
Responsible-Changed-By: peter 
Responsible-Changed-When: Sun Apr 26 00:48:47 PDT 1998 
Responsible-Changed-Why:  
I'll look into this, tail uses mmap(), it can have this effect if 
it's mapped pages become unreadable.  This problably isn't so much a 
NFS problem, as this would happen on a failed pagein request on a 
local disk too. 
State-Changed-From-To: open->closed 
State-Changed-By: peter 
State-Changed-When: Mon Dec 27 18:48:52 PST 1999 
State-Changed-Why:  
This was fixed ages ago. 
>Unformatted:
