Skip to contentSkip to conversation

use of --cipher with no arguments?

Openvpn-devel Gert Doering 3 participants 4 messages Jul 25, 2016 – Jul 26, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

has anyone ever used "--cipher" without an argument? If yes, what is the intended usage? It sort of "tells openvpn we want crypto!" but does not go into detail about it...

Normally, this would just be a random weird option, but I ran across

  --cipher none --cipher

which first tells openvpn "nah, we do not want anything!" and sets a pointer to NULL, and then tells openvpn "but please *do* use the ciphers already setup!", which core dumps.

This is not remotely exploitable, so not a *security* issue, but a bit stupid nonetheless - so I propose we just throw out "--cipher" with no arguments (--cipher none, or --cipher bf-cbc would, of course, continue to work).

Anyone having a good argument against it? JJK, do you happen to know what this is about?

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...
#1 lore raw

Hi,

Quoted 12 lines · Gert Doering

has anyone ever used "--cipher" without an argument? If yes, what is the intended usage? It sort of "tells openvpn we want crypto!" but does not go into detail about it...

Normally, this would just be a random weird option, but I ran across

  --cipher none --cipher

which first tells openvpn "nah, we do not want anything!" and sets a pointer to NULL, and then tells openvpn "but please *do* use the ciphers already setup!", which core dumps.

Quoted 7 lines

This is not remotely exploitable, so not a *security* issue, but a bit stupid nonetheless - so I propose we just throw out "--cipher" with no arguments (--cipher none, or --cipher bf-cbc would, of course, continue to work).

Anyone having a good argument against it? JJK, do you happen to know what this is about?

As the patch I just sent suggests, I don't believe this can be useful at all.

Using just --cipher is a no-op if anything but '--cipher none' is used (o->ciphername_defined is already set to true), and crashes OpenVPN otherwise. Probably just a leftover 'from the old days'.

-Steffan

#2 lore raw
In reply to Gert Doering

Hi Gert,

Quoted 14 lines · Gert Doering

Hi,

has anyone ever used "--cipher" without an argument? If yes, what is the intended usage? It sort of "tells openvpn we want crypto!" but does not go into detail about it...

Normally, this would just be a random weird option, but I ran across

   --cipher none --cipher

which first tells openvpn "nah, we do not want anything!" and sets a pointer to NULL, and then tells openvpn "but please *do* use the ciphers already setup!", which core dumps.

Quoted 8 lines

This is not remotely exploitable, so not a *security* issue, but a bit stupid nonetheless - so I propose we just throw out "--cipher" with no arguments (--cipher none, or --cipher bf-cbc would, of course, continue to work).

Anyone having a good argument against it? JJK, do you happen to know what this is about?

this is from even before my time ;)
I didn't even know that you could specify cipher without an argument - let's disable this (and I assume the same is true for --auth ?)

JJK

#3 lore raw

Hi,

Quoted 4 lines · Jan Just Keijser
Quoted 2 lines

Anyone having a good argument against it? JJK, do you happen to know what this is about?

this is from even before my time ;)

Fun :-)

Quoted 2 lines

I didn't even know that you could specify cipher without an argument - let's disable this (and I assume the same is true for --auth ?)

Indeed, the same is true, and it would lead to the same crash (--auth none --auth)

  else if (streq (p[0], "auth") && p[1] && !p[2])
    {
      VERIFY_PERMISSION (OPT_P_GENERAL);
      options->authname_defined = true;
      options->authname = p[1];
      if (streq (options->authname, "none"))
        {
          options->authname_defined = false;
          options->authname = NULL;
        }
    }
  else if (streq (p[0], "auth") && !p[1])
    {
      VERIFY_PERMISSION (OPT_P_GENERAL);
      options->authname_defined = true;
    }

I think Steffan's patch (that he sent in parallel to my mail) takes care of this as well...

gert

Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             [email protected]...
fax: +49-89-35655025                        [email protected]...