Subject: Bad NFS bug [PATCH]
From: [email-masked] (Matthias Urlichs)
Date: Mon, 12 Jul 93 13:43:07 GMT
Newsgroups: comp.os.linux,comp.os.linux.announce

[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 -- [email-masked] -- Phone: NONE; use email or lose.
Schleiermacherstrasse 12 -- 90491 Nuernberg -- Germany || Linux+Mac Consulting

--
Send submissions for comp.os.linux.announce to: [email-masked]