Newsgroups: comp.os.linux,comp.os.linux.announce
From: urlichs@smurf.sub.org (Matthias Urlichs)
Subject: Bad NFS bug [PATCH]
Message-ID: <1993Jul12.134307.23392@dg-rtp.dg.com>
Approved: linux-announce@tc.cornell.edu (Matt Welsh)
Date: Mon, 12 Jul 93 13:43:07 GMT

[This patch appears to be against Linux 0.99.pl11 alpha. --mdw]

If your NFS blocksize is a multiple of 2 (the default), this bug can
cause random memory corruption when you're reading data via NFS.

If you can't recompile your kernel, a workaround is to slightly reduce
the block size, eg. rsize=1020. See "man nfs".

diff -rub linux.11A.orig/fs/nfs/proc.c linux.11A/fs/nfs/proc.c
--- linux.11A.orig/fs/nfs/proc.c	Wed Jul  7 11:14:38 1993
+++ linux.11A/fs/nfs/proc.c	Mon Jul 12 04:00:18 1993
@@ -102,7 +102,6 @@
 	if (len > maxlen)
 		return NULL;
 	memcpy(data, (char *) p, len);
-	data[len] = '\0';
 	p += (len + 3) >> 2;
 	return p;
 }

-- 
Gomme's Laws:
       (1) A backscratcher will always find new itches.
       (2) Time accelerates.
       (3) The weather at home improves as soon as you go away.
-- 
Matthias Urlichs -- urlichs@smurf.sub.org -- Phone: NONE; use email or lose.
Schleiermacherstrasse 12 -- 90491 Nuernberg -- Germany || Linux+Mac Consulting

--
Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu
