OVERVIEW
A vulnerability exists in "faxalter", part of the hylafax-4.0.2 package
which will allow any user gain uucp and possibly root privs.
BACKGROUND
My tests were done only on FreeBSD 3.3-RELEASE which includes the
hylafax
package as an "additional package" on the install CD. Of course,
hylafax
runs on many different platforms thus anyone running hylafax should
check out his or her version for this vulnerability.
DETAILS
The faxalter program is installed suid-uucp by default when installed
from the FreeBSD-3.3 CD hylafax package. This program is contains a
buffer overflow which will allow any user to gain uucp privs. This
could become a root-compromise considering that uucp has write access
to several programs (such as minicom, cu and ecu on FreeBSD 3.3) and
could potentially trojan these programs. In addition to this, the
suid-root "hfaxd" program reads/writes to several uucp-owned files.
At the very least, a malicious user could intercept all faxes, uucp
transmitions and be generally annoying.
main (int argc, char *argv[] ) {
int x = 0;
int y = 0;
int offset = 0;
int bsize = 4093; /* overflowed buf's bytes + 4(ebp) + 4(eip) + 1 */
char buf[bsize];
int eip = 0xbfbfcfad;