CVE-1999-1122

MEDIUM4.6/ 10.0
Share:
Published: July 26, 1989 at 04:00 AM
Modified: April 3, 2025 at 01:03 AM
Source: cve@mitre.org

Vulnerability Description

Vulnerability in restore in SunOS 4.0.3 and earlier allows local users to gain privileges.

CVSS Metrics

Base Score
4.6
Severity
MEDIUM
Vector String
AV:L/AC:L/Au:N/C:P/I:P/A:P

Weaknesses (CWE)

NVD-CWE-Other
Source: nvd@nist.gov

AI Security Analysis

01 // Technical Summary

SunOS 4.0.3 and earlier systems are vulnerable to a local privilege escalation via a flaw in the restore utility. This vulnerability allows attackers to gain root access by exploiting improper handling of file permissions during the restore process, potentially leading to complete system compromise and data exfiltration.

02 // Vulnerability Mechanism

Step 1: Malicious Backup Creation: The attacker crafts a malicious backup archive. This archive contains files with elevated permissions, such as a modified system binary (e.g., /bin/su) with the setuid bit set to root, or a new file with root ownership and permissions.

Step 2: Backup Upload/Access: The attacker places the malicious backup archive on the target system, or ensures it is accessible to the target system (e.g., via network share).

Step 3: Restore Execution: The attacker, with local access and potentially limited privileges, executes the restore command, specifying the malicious backup archive as the source. This typically requires the attacker to have some level of access to the system, or to trick an administrator into running the command.

Step 4: Permission Overwrite: The restore utility, due to the vulnerability, restores the files from the malicious backup, including the modified system binary or newly created files, with the attacker-specified permissions and ownership (root).

Step 5: Privilege Escalation: The attacker executes the modified system binary (e.g., /bin/su), which now has the setuid bit set, or interacts with the newly created files, gaining root privileges.

03 // Deep Technical Analysis

The vulnerability stems from a privilege escalation flaw within the restore utility in SunOS 4.0.3 and earlier. The restore utility, when invoked by a user with sufficient privileges, fails to properly sanitize or validate file permissions during the restoration of files from a backup. This allows a local user to craft a malicious backup archive containing files with elevated permissions (e.g., setuid root) and then use restore to overwrite existing system files. The root cause is a lack of input validation and improper handling of file ownership and permissions during the restore operation. The utility trusts the metadata within the backup archive without verifying its integrity, leading to the potential for arbitrary file creation and modification with elevated privileges.

CVE-1999-1122 - MEDIUM Severity (4.6) | Free CVE Database | 4nuxd