From: marco ancillotti <mancillotti@interfree.it>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] mconsole proc interface patch
Date: 29 Sep 2003 18:47:31 +0200 [thread overview]
Message-ID: <1064854051.21559.5.camel@mancillotti.retesintesi.net> (raw)
[-- 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);
next reply other threads:[~2003-09-29 16:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-29 16:47 marco ancillotti [this message]
2003-10-06 21:22 ` [uml-devel] mconsole proc interface patch Jeff Dike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1064854051.21559.5.camel@mancillotti.retesintesi.net \
--to=mancillotti@interfree.it \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox