Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!

TUCoPS :: Linux :: Apps N-Z :: stunne.htm

Stunnel 3.8 format string vulnerability



    stunnel<= 3.8


    Following is  based on  a Macaroon  Advisory.   They have recently
    discovered  a  format  bug  in  stunnel<=  3.8  in which the log()
    function calls  directly the  syslog() with  only two  parameters:
    syslog(level, text).  It should be syslog(level, "%s", text).

    If a user can pass any string that is written to the log file,  he
    can   exploit   this   vulnerablilty   with   carefully  formatted
    formatstrings (with %n in it).

    When debugging is turned on (-d 7) the username that is looked  up
    via  ident  is  written  to  the  log  file.  So if the client can
    manipulate  it's  ident  username,  he  can  own  the host running
    stunnel.   Another case,  when stunnel's  native smtp  support and
    debugging is  turned on,  it's exploitable,  too.   Of course it's
    not a complete list of exploit methods.  There may be many more.

    Here are few more bugs:
    - stunnel-3.8 and previous did  not properly seed the PRNG.   This
      could lead to weak encryption on machines that lack /dev/urandom
      (such as Solaris,  Windows, etc.   BSD's, and Linux  for example
      were not affected.)
    - stunnel-3.8  and previous  had insecure  pid file  creation, and
      was thus  vulnerable to  symlink games.   (Ability to  overwrite
      any file on the system.   Since stunnel is usually used to  bind
      low  ports,  stunnel  was  usually  run  as  root,  and this was
      potentially very damaging.)
    - stunnel-3.8p4 and previous were affected by the afformeantioned
      format string bug.
    - stunnel-3.8p4 and previous was not entirely thread-safe.   (Only
      informational counters were  affected by this,  nothing security
      or functional related.)


    The fix from the stunnel author (Michal Trojnara) is out, you  can
    download the latest stable version from

    or you can hotfix the bug in log.c (about line 67):

        -        syslog(level, text);
        +        syslog(level, "%s", text);

    All versions of Trustix Secure Linux are vulnerable provided  that
    the server  is actually  configured to  use stunnel.   This  means
    that  a  default  install  of  the  system will technically not be
    vulnerable, but TL suggests that our users follow security updates
    regardless of what is actually run today.

    Users of  v1.0x should  as usual  use the  update built  for v1.1.
    For version  1.2, the  distribution tree  and the  iso images have
    been  updated  on  our  sites,  and  will  be available on mirrors
    shortly.  The build date of the iso images is 20001219.

    For Conectiva Linux:

    For RedHat:

    For Debian:

    For FreeBSD:

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2015 AOH