Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Apr 1997 19:19:56 +0200 (MET DST)
From:      Tor Egge <Tor.Egge@idi.ntnu.no>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/3298: NFS privport handling is broken
Message-ID:  <199704151719.TAA11528@ikke.idt.unit.no>
Resent-Message-ID: <199704151730.KAA23300@freefall.freebsd.org>

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

>Number:         3298
>Category:       kern
>Synopsis:       NFS privport handling is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 15 10:30:01 PDT 1997
>Last-Modified:
>Originator:     Tor Egge
>Organization:
Norwegian University of Science and Technology, Trondheim, Norway
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

FreeBSD ikke.idt.unit.no 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Tue Apr  8 03:18:44 MET DST 1997     root@ikke.idt.unit.no:/usr/src/sys/compile/TEGGE  i386

FreeBSD 3.0-CURRENT NFS server.
SunOS 5.4 NFS client.

>Description:

	Some (older) versions of amd or automount, and some versions
	of mount use unprivileged ports when checking for the availability
	of nfsd on the NFS server. 

	[On the SunOS 5.4 client]
	staude# mount ikke:/export/akg2/store /mnt
	nfs mount: ikke: NFS service not responding
	nfs mount: retrying: /mnt

	[On the FreeBSD 3.0-CURRENT NFS server]
	Apr 15 17:17:17 ikke /kernel: NFS request from unprivileged port (129.241.111.23

>How-To-Repeat:

>Fix:
	
	As a special case, allow the NFS NULL procedure even when the client
	port is not privileged.

Index: nfs_syscalls.c
===================================================================
RCS file: /home/ncvs/src/sys/nfs/nfs_syscalls.c,v
retrieving revision 1.20
diff -u -r1.20 nfs_syscalls.c
--- nfs_syscalls.c	1997/03/27 20:01:07	1.20
+++ nfs_syscalls.c	1997/04/15 15:24:56
@@ -605,7 +605,8 @@
 
 			sin = mtod(nam, struct sockaddr_in *);
 			port = ntohs(sin->sin_port);
-			if (port >= IPPORT_RESERVED) {
+			if (port >= IPPORT_RESERVED && 
+			    nd->nd_procnum != NFSPROC_NULL) {
 			    nd->nd_procnum = NFSPROC_NOOP;
 			    nd->nd_repstat = (NFSERR_AUTHERR | AUTH_TOOWEAK);
 			    cacherep = RC_DOIT;
>Audit-Trail:
>Unformatted:



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