[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#32359: marked as done (nfs-server: nfsd dies [patch for libc])



Your message dated Fri, 17 Sep 1999 13:02:37 -0700
with message-id <v04205529b4084e74d522@[206.163.71.146]>
and subject line Not relevant to glibc 2.1.
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 25 Jan 1999 05:38:05 +0000
Received: (qmail 6912 invoked from network); 25 Jan 1999 05:38:05 -0000
Received: from kanga.eecs.umich.edu (steveh@141.213.11.150)
  by master.debian.org with SMTP; 25 Jan 1999 05:38:05 -0000
Received: (from steveh@localhost)
	by kanga.eecs.umich.edu (8.9.2/8.9.1/Debian/GNU) id AAA03986;
	Mon, 25 Jan 1999 00:38:03 -0500 (EST)
Date: Mon, 25 Jan 1999 00:38:03 -0500 (EST)
Message-Id: <199901250538.AAA03986@kanga.eecs.umich.edu>
From: <steveh@eecs.umich.edu>
Subject: nfs-server: nfsd dies [patch for libc]
To: submit@bugs.debian.org
X-Mailer: bug 3.1.7

Package: nfs-server
Version: 2.2beta37-2

This is in regards to bug #27981 and perhaps #26079.  From what I gather
nfsd dies because of a patch applied to libc6.  Reversing the libc6
patch, at least for me, fixes the rpc.nfsd dying problem.  I am filing a 
duplicate bug report here because others who are being bitten by the problem 
may not look in the libc6 bugs for a solution.  It's not clear whether
or not the libc6 maintainer will fix this though.

For more details, see libc6 bug #28954.

Summary:

>Date: Tue, 15 Dec 1998 17:17:01 -0500 (EST)
>From: Steve Hsieh <steveh@eecs.umich.edu>
>To: 28954@bugs.debian.org
Subject: Re: DoS fix which breaks rpc.nfsd (patch)


Can we get Thorsten's patch included in the next release of debian?
Without this patch, the NFS server will crash unpredictably in a
heterogenous networked environment.

I had some problems applying Thorsten's patch directly to 2.0.7u-7.1, so I
made the changes by hand and attached the new diff below for your
convenience.

--- svc_tcp.c.orig	Tue Jul  7 13:05:42 1998
+++ svc_tcp.c	Mon Dec  7 12:53:44 1998
@@ -286,20 +286,17 @@
  * reads data from the tcp connection.
  * any error is fatal and the connection is closed.
  * (And a read of zero bytes is a half closed stream => error.)
- *
- * Note: we have to be careful here not to allow ourselves to become
- * blocked too long in this routine.  While we're waiting for data from one
- * client, another client may be trying to connect.  To avoid this situation,
- * some code from svc_run() is transplanted here: the select() loop checks
- * all RPC descriptors including the one we want and calls svc_getreqset2()
- * to handle new requests if any are detected.
  */
 static int
 readtcp (register SVCXPRT *xprt, caddr_t buf, register int len)
 {
   int sock = xprt->xp_sock;
 #ifdef FD_SETSIZE
+  fd_set mask;
   fd_set readfds;
+
+  FD_ZERO (&mask);
+  FD_SET (sock, &mask);
 #else
   int mask = 1 << sock;
   int readfds;
@@ -307,28 +304,21 @@
   while (1)
     {
       struct timeval timeout = wait_per_try;
-      readfds = svc_fdset;
-#ifdef FD_SETSIZE
-      FD_SET (sock, &readfds);
-#else
-      readfds = svc_fds;
-      readfds |= (1 << sock);
-#endif /* def FD_SETSIZE */
+      readfds = mask;
       if (select (_rpc_dtablesize (), &readfds, (fd_set *) NULL,
-		  (fd_set *) NULL, &timeout) <= 0)
-	{
-	  if (errno == EINTR)
-	    continue;
-	  goto fatal_err;
-	}
+                  (fd_set *) NULL, &timeout) <= 0)
+        {
+          if (errno == EINTR)
+            continue;
+          goto fatal_err;
+        }
+
 #ifdef FD_SETSIZE
       if (FD_ISSET (sock, &readfds))
 #else
-      if (readfds != mask)
+      if (readfds == mask)
 #endif /* def FD_SETSIZE */
 	break;
-
-      svc_getreqset (&readfds);
     }
 
   if ((len = read(sock, buf, len)) > 0)


Reply to: