* [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
* Re: [uml-devel] mconsole proc interface patch
2003-09-29 16:47 [uml-devel] mconsole proc interface patch marco ancillotti
@ 2003-10-06 21:22 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2003-10-06 21:22 UTC (permalink / raw)
To: marco ancillotti; +Cc: user-mode-linux-devel
mancillotti@interfree.it said:
> 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.
It sure didn't take long for people to start finding problems there :-)
I thought (but didn't check) that any .. action would result in -ENOENT
because the superblock being used isn't mounted anywhere.
I'm not sure that fix is right, but I'll find some other fix if so.
Jeff
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ 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