Skip to contentSkip to conversation

Fixed segfault in rpc.mountd

PATCH In review Steve Dickson 2 participants 4 messages Jan 26, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fixed segfault in rpc.mountd

A unallocated piece of memory, instead of a NULL point, was being used to initialize a ->next point in the mount link list which caused a segfault after a few remote accesses via the showmount command.

---
 utils/mountd/rmtab.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
utils/mountd/rmtab.c +1 -0
index d339296..527377f 100644
@@ -205,6 +205,7 @@ mountlist_list(void)
 	}
 	if (stb.st_mtime != last_mtime) {
 		mountlist_freeall(mlist);
+		mlist = NULL;
 		last_mtime = stb.st_mtime;
 
 		setrmtabent("r");
Signature · 1 line
1.7.3.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Steve Dickson

A unallocated piece of memory, instead of a NULL point, was being used to initialize a ->next point in the mount link list which caused a segfault after a few remote accesses via the showmount command.

I thought there was a patch on the list just like this last week... in any event:

Quoted 18 lines

---
utils/mountd/rmtab.c | 1 +

1 files changed, 1 insertions(+), 0 deletions(-)
utils/mountd/rmtab.c +1 -0
index d339296..527377f 100644
@@ -205,6 +205,7 @@ mountlist_list(void)
 	}
 	if (stb.st_mtime != last_mtime) {
 		mountlist_freeall(mlist);
+		mlist = NULL;
 		last_mtime = stb.st_mtime;
 
 		setrmtabent("r");
Signature · 2 lines
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
#2 lore raw
Quoted 11 lines · Chuck Lever
Quoted 4 lines · Steve Dickson

A unallocated piece of memory, instead of a NULL point, was being used to initialize a ->next point in the mount link list which caused a segfault after a few remote accesses via the showmount command.

I thought there was a patch on the list just like this last week... in any event:

Thanks!

steved.

Quoted 21 lines
Quoted 20 lines

---
utils/mountd/rmtab.c | 1 +

1 files changed, 1 insertions(+), 0 deletions(-)
utils/mountd/rmtab.c +1 -0
index d339296..527377f 100644
@@ -205,6 +205,7 @@ mountlist_list(void)
 	}
 	if (stb.st_mtime != last_mtime) {
 		mountlist_freeall(mlist);
+		mlist = NULL;
 		last_mtime = stb.st_mtime;
 
 		setrmtabent("r");
#3 lore raw
In reply to Steve Dickson
Quoted 15 lines · Steve Dickson

A unallocated piece of memory, instead of a NULL point, was being used to initialize a ->next point in the mount link list which caused a segfault after a few remote accesses via the showmount command.

---
 utils/mountd/rmtab.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
utils/mountd/rmtab.c +0 -0
index d339296..527377f 100644

utils/mountd/rmtab.c mountlist_list(void) · line 211

Quoted 7 lines
utils/mountd/rmtab.c +1 -0
@@ -205,6 +205,7 @@ mountlist_list(void)
 	}
 	if (stb.st_mtime != last_mtime) {
 		mountlist_freeall(mlist);
+		mlist = NULL;
 		last_mtime = stb.st_mtime;
 
 		setrmtabent("r");

Committed....

steved.