public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4.13-ac5 && vtun not working
@ 2001-10-30  1:17 Lehmann 
  2001-10-30  1:39 ` Lehmann 
  2001-10-30  1:48 ` Maksim Krasnyanskiy
  0 siblings, 2 replies; 10+ messages in thread
From: Lehmann  @ 2001-10-30  1:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marco Maisenhelder, oesi

After upgrading to linux-2.4.13-ac5, everything seems to work, except all
my vtun tunnels.

a _lot_ of searching revealed this code fragment:

        /*
         * Verify the string as this thing may have come from
         * the user.  There must be one "%d" and no other "%"
         * characters.
         */
        p = strchr(name, '%');
        if (!p || p[1] != 'd' || strchr(p+2, '%'))
                return -EINVAL;

Well, obviously my devicename _do_ come "from the user", as I really like
to name my tun devices (and everything else). The problem is that vtund
passes in "tun2" as devicename, which does not contain a "%d".

Maybe this piece of code is designed to fix security problems, but it
keeps vtund from working properly.

How about this change?

-        if (!p || p[1] != 'd' || strchr(p+2, '%'))
+        if (p && (p[1] != 'd' || strchr(p+2, '%')))


-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg@goof.com      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

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

end of thread, other threads:[~2001-11-06 23:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-30  1:17 2.4.13-ac5 && vtun not working Lehmann 
2001-10-30  1:39 ` Lehmann 
2001-10-30  1:48 ` Maksim Krasnyanskiy
2001-10-30  1:53   ` David S. Miller
2001-10-31  0:05     ` Lehmann 
2001-10-31  8:30       ` David S. Miller
2001-10-31  9:43         ` Lehmann 
2001-10-31 17:55         ` Maksim Krasnyanskiy
2001-11-06 23:32           ` David S. Miller
2001-11-06 23:53           ` Maksim Krasnyanskiy

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