I. Description
Since CA-2001-31
was originally released last November, the CERT/CC has received
reports of scanning for dtspcd (6112/tcp). Just recently,
however, we have received credible reports of an exploit for Solaris
systems. Using network traces provided by The Honeynet Project, we have
confirmed that the dtspcd vulnerability identified in CA-2001-31
and discussed in VU#172583 is actively
being exploited.
The Common Desktop Environment (CDE) is an integrated graphical
user interface that runs on UNIX and Linux operating systems. The CDE
Subprocess Control Service (dtspcd) is a network daemon that
accepts requests from clients to execute commands and launch
applications remotely. On systems running CDE, dtspcd is
spawned by the Internet services daemon (typically inetd or
xinetd) in response to a CDE client request. dtspcd
is typically configured to run on port 6112/tcp with root privileges.
There is a remotely exploitable buffer overflow vulnerability in a
shared library that is used by dtspcd. During client
negotiation, dtspcd accepts a length value and subsequent
data from the client without performing adequate input validation. As
a result, a malicious client can manipulate data sent to
dtspcd and cause a buffer overflow, potentially executing
code with root privileges. The overflow occurs in a fixed-size 4K
buffer that is exploited by the contents of one of the attack packets.
The signature can be found at bytes 0x3e-0x41 in the following attack
packet from a tcpdump log (lines may wrap):
09:46:04.378306 10.10.10.1.3592 > 10.10.10.2.6112: P 1:1449(1448) ack 1 win 16060 <nop,nop,timestamp 463986683 4158792> (DF)
0x0000 4500 05dc a1ac 4000 3006 241c 0a0a 0a01 E.....@.0.$.....
0x0010 0a0a 0a02 0e08 17e0 fee2 c115 5f66 192f ...f........_f./
0x0020 8018 3ebc e1e9 0000 0101 080a 1ba7 dffb ..>.............
0x0030 003f 7548 3030 3030 3030 3032 3034 3130 .?uH000000020410
0x0040 3365 3030 3031 2020 3420 0000 0031 3000 3e0001..4....10.
0x0050 801c 4011 801c 4011 1080 0101 801c 4011 ..@...@.......@.
0x0060 801c 4011 801c 4011 801c 4011 801c 4011 ..@...@...@...@.
...
The value 0x103e in the ASCII (right) column above is interpreted
by the server as the number of bytes in the packet to copy into the
internal 4K (0x1000) buffer. Since 0x103e is greater than 0x1000, the
last 0x3e bytes of the packet will overwrite memory after the end of
the 4K buffer. This is the same compromise vector identified in VU#172583.
It is important to note that several Internet-enabled games may
also use port 6112/tcp as a legitimate part of their normal operation,
therefore, not all network activity involving this service may be
malicious. Network administrators monitoring this type of activity may
wish to verify whether probes of this type are actually attempts to
exploit VU#172583.
Many common UNIX systems ship with CDE installed and enabled by
default. To determine if your system is configured to run
dtspcd, check for the following entries (lines may
wrap):
-
in /etc/services
-
dtspc 6112/tcp
in /etc/inetd.conf
-
dtspc stream tcp nowait root /usr/dt/bin/dtspcd /usr/dt/bin/dtspcd
Any system that does not run the CDE Subprocess Control Service is
not vulnerable to this problem.