[ SOURCE: http://www.secureroot.com/security/advisories/9772056190.html ] Hi, ppl We 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. The fix from the stunnel author (Michal Trojnara) is out, you can download the latest stable version from http://www.stunnel.org/download/stunnel/src/stunnel-3.9.tar.gz or you can hotfix the bug in log.c (about line 67): - syslog(level, text); + syslog(level, "%s", text); Marry Christmas :) -- Lez lez@sch.hu