[ advisories | exploits | discussions | news | conventions | security tools | texts & papers ]
 main menu
- feedback
- advertising
- privacy
- FightAIDS
- newsletter
- news
- read forum
- new topic
- search

- meetings list
- recent additions
- add your info
 top 100 sites
- visit top sites
- sign up now
- members

- add your url
- add domain
- search box
- link to us

- our projects
- free email
 m4d network
- security software
- secureroot
- m4d.com
Home : Advisories : Format bug in stunnel<= 3.8

Title: Format bug in stunnel<= 3.8
Released by: Lez
Date: 19th December 2000
Printable version: Click here

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


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

-        syslog(level, text);

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

Marry Christmas :)




(C) 1999-2000 All rights reserved.