CVE-1999-1299: Linux rcp arbitrary file overwrite via UID 65535 integer signedness error

CVE-1999-1299 · Severity: critical · CVSS 10 · Published 1997-02-03

A vulnerability in the rcp (remote copy) utility on older Linux systems allows a low-privileged user, such as the 'nobody' account, to overwrite sensitive system files. This occurs because the system incorrectly handles a specific user ID, failing to drop administrative privileges before performing file operations. An attacker could use this to gain full control over the server, potentially leading to complete data theft or system takeover.

Technologies: Redhat Linux, Slackware Linux. Vendors: Redhat, Slackware.

Quick answers

Is CVE-1999-1299 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-1999-1299 being exploited in the wild.
How severe is CVE-1999-1299?
Critical severity, with a CVSS score of 10, published 3 February 1997.
Which products and versions are affected?
Linux Foundation Linux Red Hat 4.0, Slackware 3.1.
Is there a fix for CVE-1999-1299?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-1999-1299 attacked?
It is attacked over the network or with local access, in an operating system.
Am I affected by CVE-1999-1299?
Check whether you run Redhat Linux or Slackware Linux. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The rcp utility is setuid root to allow it to bind to privileged ports. When it attempts to drop privileges using setuid() for a user with UID 65535, the system call interprets 65535 as -1. Because -1 is also the error return value for these system calls, the privilege drop fails or is ignored, and rcp continues to execute with root privileges. An attacker with access to the 'nobody' account (often used by web servers like NCSA httpd) can exploit this to overwrite arbitrary files, such as /root/.rhosts, to gain full remote root access. This can be triggered locally or remotely if a web application allows execution of system commands.

Affected products

  • Linux Foundation Linux Red Hat 4.0, Slackware 3.1

Timeline

  • 1997-02-03: disclosed: Initial disclosure on Bugtraq mailing list
  • 1997-02-03: advisory: NVD publication date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.