FreeBSD Ports Security Advisory FreeBSD-SA-01:41.hanterm

FreeBSD Security Advisories security-advisories at
Mon Jul 9 09:30:12 PDT 2001


FreeBSD-SA-01:41                                           Security Advisory
                                                                FreeBSD, Inc.

Topic:          hanterm ports allow local root compromise

Category:       ports
Module:         ko-hanterm, ko-hanterm-xf
Announced:      2001-07-09
Credits:        ksecurity at
Affects:        Ports collection prior to the correction date.
Corrected:      2001-05-29
Vendor status:  Contacted
FreeBSD only:   NO

I.   Background

hanterm is a modified version of xterm which supports Korean language
entry and display.  It is included in the FreeBSD ports collection in
two versions: ko-hanterm and ko-hanterm-xf.

II.  Problem Description

The hanterm binary is installed with setuid root permissions, but
contains insecure code which allows unprivileged local users to obtain
root access on the local system.

The hanterm ports are not installed by default, nor is it "part of
FreeBSD" as such: it is part of the FreeBSD ports collection, which
contains over 5400 third-party applications in a ready-to-install
format.  The ports collections shipped with FreeBSD 4.3 contain this
problem since it was discovered after the release.

FreeBSD makes no claim about the security of these third-party
applications, although an effort is underway to provide a security
audit of the most security-critical ports.

III. Impact

Unprivileged local users can obtain root access on the local system.

If you have not chosen to install the ko-hanterm or ko-hanterm-xf
ports/packages, then your system is not vulnerable to this problem.

IV.  Workaround

1) Deinstall the ko-hanterm and ko-hanterm-xf ports/packages, if you
have installed them.

2) Remove the setuid root permission from the /usr/X11R6/bin/hanterm
file.  Execute the following command as root:

# chmod u-s /usr/X11R6/bin/hanterm

V.   Solution

One of the following:

1) Upgrade your entire ports collection and rebuild the
ko-hanterm/ko-hanterm-xf ports.

2) Deinstall the old package and install a new package dated after the
correction date, obtained from:



Packages are not automatically generated for the alpha architecture at
this time due to lack of build resources.

3) download a new port skeleton for the ko-hanterm/ko-hanterm-xf port

and use it to rebuild the port.

4) Use the portcheckout utility to automate option (3) above. The
portcheckout port is available in /usr/ports/devel/portcheckout or the
package can be obtained from:
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see


This is the moderated mailing list freebsd-announce.
The list contains announcements of new FreeBSD capabilities,
important events and project milestones.
See also the FreeBSD Web pages at

To Unsubscribe: send mail to majordomo at
with "unsubscribe freebsd-announce" in the body of the message

More information about the freebsd-announce mailing list