VYPR
Unrated severityNVD Advisory· Published Sep 13, 1999· Updated Apr 16, 2026

CVE-1999-1014

CVE-1999-1014

Description

Buffer overflow in Solaris 2.7 /usr/bin/mail via long -m argument allows privilege escalation to group mail.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Buffer overflow in Solaris 2.7 /usr/bin/mail via long -m argument allows privilege escalation to group mail.

Vulnerability

A buffer overflow exists in the mail command on Solaris 2.7 (and possibly 2.7 x86). The vulnerability is triggered by supplying an overly long argument to the -m option. The mail binary is setgid mail and drops privileges before the overflow occurs under normal circumstances, but the overflow still allows arbitrary command execution as the mail group. Affected versions include Solaris 2.7 on SPARC and x86 [1][2].

Exploitation

An attacker must have local access to the system and can run /usr/bin/mail -m <long_string> foo. The long string overflows a buffer, overwriting the return address. However, because mail drops its setgid privileges before the overflow, the resulting shell executes with the original user's privileges, not the mail group. A working exploit uses shellcode that calls setregid(getegid(), getegid()) to align the real and effective GID, allowing the spawned shell to retain the effective GID (mail) and thus execute with group mail privileges [1]. The exploit was demonstrated on Solaris x86 2.7.

Impact

Successful exploitation allows an attacker to execute arbitrary code with the effective GID of mail. This can lead to reading or writing mail files owned by group mail, potentially accessing other users' mail spools or interfering with mail delivery. The attacker does not gain root or full system compromise but can escalate from a standard user to the mail group and perform actions normally restricted to that group [1][2].

Mitigation

Sun Microsystems released a patch for this vulnerability. For Solaris 2.7, the recommended fix is to install the appropriate patch from Sun. As of the public disclosure date (September 1999), no workaround other than applying the vendor patch was provided. The vulnerability is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog. Users should ensure their system is patched to the latest recommended cluster [1][2].

AI Insight generated on May 24, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

Root cause

"A buffer overflow vulnerability exists in the mail command when processing the -m argument."

Attack vector

A local user can exploit this vulnerability by providing a long string as the -m argument to the mail command. This long argument overwrites a buffer, allowing an attacker to gain privileges. The exploit involves carefully crafting the input to overwrite return addresses and execute arbitrary code, as demonstrated by the provided exploit code [ref_id=1].

Affected code

The vulnerability resides in the mail command, specifically when processing the -m argument. The provided exploit code targets the /usr/bin/mail binary on Solaris 2.7 [ref_id=1].

What the fix does

The advisory does not specify a patch or provide details on how the vulnerability is fixed. However, the reference write-up indicates that the issue is related to a buffer overflow in the mail command when handling the -m argument, and that a corrected shellcode was developed to address privilege dropping issues [ref_id=1].

Preconditions

  • authThe attacker must have local access to the affected system.
  • inputThe attacker must be able to execute the mail command with a specially crafted, long -m argument.

Reproduction

bash-2.02$ uname -a; id SunOS solhack 5.7 Generic_106542-05 i86pc i386 i86pc uid=136(btellier) gid=100(devel) bash-2.02$ /usr/bin/mail -m `./mailex 0 1975 2285` foo . $ id uid=136(btellier) gid=6(mail) $ [ref_id=1]

Generated on Jun 4, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.