lkml.org 
[lkml]   [1999]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectNFS_ROOT bug
Hi,

I came across a small bug in the NFS root mount_clnt implementation.
The buffer size in the RPC call structure is not correctly set - worse
is that a rogue pointer (the result size) is entered at the "call count"
spot.

Here is a tiny patch.

- Peter ---- fs/nfs/mount_clnt.c.orig Tue Nov 2 12:05:36 1999
+++ fs/nfs/mount_clnt.c Tue Nov 2 12:15:00 1999
@@ -23,6 +23,11 @@
# define NFSDBG_FACILITY NFSDBG_ROOT
#endif

+#ifndef MAX
+# define MAX(a, b) (((a) > (b))? (a) : (b))
+#endif
+
+
/*
#define MOUNT_PROGRAM 100005
#define MOUNT_VERSION 1
@@ -119,7 +124,7 @@
{ "mnt_mount",
(kxdrproc_t) xdr_encode_dirpath,
(kxdrproc_t) xdr_decode_fhstatus,
- MNT_dirpath_sz, MNT_fhstatus_sz },
+ MAX(MNT_dirpath_sz, MNT_fhstatus_sz), 0},
};

static struct rpc_version mnt_version1 = {
\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.061 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site