linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] mconsole proc interface patch
@ 2003-09-29 16:47 marco ancillotti
  2003-10-06 21:22 ` Jeff Dike
  0 siblings, 1 reply; 2+ messages in thread
From: marco ancillotti @ 2003-09-29 16:47 UTC (permalink / raw)
  To: user-mode-linux-devel

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

in last version of uml patch there's a bug that make uml crash when from
uml_mconsole someone try to use:

proc ../SOMETHINK

there's a patch to resolv prolem.

bye,
marco.

----------------------------------------------------

--- mconsole_kern.c.old	2003-09-29 18:27:36.000000000 +0200
+++ mconsole_kern.c	2003-09-29 18:37:38.000000000 +0200
@@ -158,6 +158,11 @@
 	nd.flags = O_RDONLY + 1;
 	nd.last_type = LAST_ROOT;
 
+	if ( strstr ( ptr , "../" ) == ptr ) {
+		mconsole_reply(req , "Not a valid file" , 1 ,0);
+		goto out_kill;
+	}
+
 	err = link_path_walk(ptr, &nd);
 	if(err){
 		mconsole_reply(req, "Failed to look up file", 1, 0);


----------------------------------------------------


-- 
----------------------------------------------------

Marco Ancillotti 
uniX / Linux Tecnical specialist

- IBM Aix Certified Advanced Tecnical Specialist
- IBM Enterprise storage specialist
- Red Hat Certified Engineer

    Lpar manager first developer and mantainer.
( http://savannah.nongnu.org/projects/lparmanager )

S.in.te.si. srl
via cecchi 28
50053 Empoli (FI)
tel: 0571/72400
fax: 0571/72064

mancillotti@interfree.it
cell: 347/3460086

----------------------------------------------------

[-- Attachment #2: nero.patch --]
[-- Type: text/x-diff, Size: 412 bytes --]

--- mconsole_kern.c.old	2003-09-29 18:27:36.000000000 +0200
+++ mconsole_kern.c	2003-09-29 18:37:38.000000000 +0200
@@ -158,6 +158,11 @@
 	nd.flags = O_RDONLY + 1;
 	nd.last_type = LAST_ROOT;
 
+	if ( strstr ( ptr , "../" ) == ptr ) {
+		mconsole_reply(req , "Not a valid file" , 1 ,0);
+		goto out_kill;
+	}
+
 	err = link_path_walk(ptr, &nd);
 	if(err){
 		mconsole_reply(req, "Failed to look up file", 1, 0);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-10-06 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-29 16:47 [uml-devel] mconsole proc interface patch marco ancillotti
2003-10-06 21:22 ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox