Home page logo

bugtraq logo Bugtraq mailing list archives

Re: security hole in mailx
From: alvaro () lander es (Alvaro Martinez Echevarria)
Date: Fri, 26 Jun 1998 06:12:11 +0200

On Thu, 25 Jun 1998, Casper Dik wrote:

It should be noted that homedir itself, at least on Solaris,,
is a char homedir[PATHSIZE] which is copied from the environment.
(This never stops to amaze me; why *copy* the result from getenv()?)
You'd want to fix the overflow of homedir too; looks like there
are a few other overflows as well.

Under the Linux sources, homedir is a char *, that is malloc'ed
and filled from the environment variable value. A nice way to
waste some CPU, yeah.

By the way, assuming that homedir is a global variable in
Solaris, that could be the reason why the overflow doesn't seem
to reach the stack (such has been reported to me in several
messages). But that may have changed in the last version: a 5.6
mailx with the latest patches applied dies by "Bus Error" (as
reported by Jared Buntain) instead of "Segmentation Fault". I
haven't checked it, but sounds to me like a stack overflow.

I don't particularly care for arguments as "seem exploitable".
The homedir data segment buffer overflow may well be exploitable;
in the Solaris sources, there is at least one other buffer overflow
on the stack.

Of course, the patch I sent addresses all the buffer overflows I
detected after a quick inspection. Not only the "seems
exploitable" one.


|   Alvaro Martínez Echevarría   |      LANDER SISTEMAS            |
|        alvaro () lander es        |      Pº Castellana, 121         |
`--------------------------------|      28046 Madrid, SPAIN        |
                                 |      Tel: +34-91-5562883        |
                                 |      Fax: +34-91-5563001        |

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]