OVERVIEW
A serious bug exists in UnixWare 7.1's libc. A buffer overflow in
gethostbyname() will allow any user to obtain elevated privileges.
BACKGROUND
Is this the same gethostbyname() overflow which was present in ancient
versions of non-unixware libc's way back when? I can't say for sure, but
given SCO's record of fixing known holes (remember the OpenServer 5
Xtlib overflows, still present four years after they were known?), I
wouldn't doubt it.
DETAILS
Any program which uses gethostbyname() with user-defined input is
vulnerable to a buffer overflow attack. These overflows come with
various eases of exploitability. My demonstration program happened to
be "arp", but any program calling this function will do. When exploiting
the dozens of programs vulnerable to this hole, don't forget to check
your /etc/security/tcb/privs file for other non-suid programs which may
allow you to elevate your privileges as well. See my uidadmin advisory
for more info on UW7's privilege system.
EXPLOIT
--- uwarp.c ---
/**
** UnixWare 7.1 arp exploit yields gid of sys
** Demonstrates overflow in uw71's gethostbyname()
** use offsets of +-100
** Brock Tellier btellier@usa.net
**
**/