CVE-2014-1876: Medium severity ORACLE OpenJDK vulnerability

Published Feb 3, 2014
·
Updated

Jakub Wilk reported in a Debian bug report [1] that the unpack200 program included in OpenJDK did not properly handle the logfile properly. If the the log file was unable to be opened, it would create /tmp/unpack.log instead as the fallback, but do so in an insecure manner, as shown in unpack.cpp (the below is from OpenJDK 6):

4732 void unpacker::redirectstdio() { ... 4757 #else 4758 sprintf(tmpdir,"/tmp"); 4759 sprintf(logfilename, "/tmp/unpack.log"); 4760 #endif 4761 if ((errstrm = fopen(logfilename, "a+")) != NULL) { 4762 logfile = errstrmname = saveStr(logfilename); 4763 return ; 4764 } 4765 4766 char tname = tempnam(tmpdir,"#upkg"); 4767 sprintf(logfilename, "%s", tname); 4768 if ((errstrm = fopen(logfilename, "a+")) != NULL) { 4769 logfile = errstrmname = saveStr(logfilename); 4770 return ; 4771 }

The same exists in OpenJDK 7 and 8.

This could allow a malicious local attacker to conduct local attacks, such as symlink attacks, where a file could be overwritten if the user running unpack200 had write permissions.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737562

Other sources

The unpacker::redirectstdio function in unpack.cpp in unpack200 in OpenJDK 6, 7, and 8; Oracle Java SE 5.0u61, 6u71, 7u51, and 8; JRockit R27.8.1 and R28.3.1; and Java SE Embedded 7u51 does not securely create temporary files when a log file cannot be opened, which allows local users to overwrite arbitrary files via a symlink attack on /tmp/unpack.log.

Affected Software

23 affected componentsFixes available
redhat/java<1.7.0-oracle-1:1.7.0.55-1jpp.2.el5_10
1.7.0-oracle-1:1.7.0.55-1jpp.2.el5_10
redhat/java<1.6.0-sun-1:1.6.0.75-1jpp.3.el5_10
1.6.0-sun-1:1.6.0.75-1jpp.3.el5_10
redhat/java<1.7.0-oracle-1:1.7.0.55-1jpp.1.el6_5
1.7.0-oracle-1:1.7.0.55-1jpp.1.el6_5
redhat/java<1.6.0-sun-1:1.6.0.75-1jpp.1.el6_5
1.6.0-sun-1:1.6.0.75-1jpp.1.el6_5
redhat/java<1.7.0-openjdk-1:1.7.0.55-2.4.7.1.el5_10
1.7.0-openjdk-1:1.7.0.55-2.4.7.1.el5_10
redhat/java<1.6.0-openjdk-1:1.6.0.0-5.1.13.3.el5_10
1.6.0-openjdk-1:1.6.0.0-5.1.13.3.el5_10
redhat/java<1.7.0-openjdk-1:1.7.0.55-2.4.7.1.el6_5
1.7.0-openjdk-1:1.7.0.55-2.4.7.1.el6_5
redhat/java<1.6.0-openjdk-1:1.6.0.0-5.1.13.3.el6_5
1.6.0-openjdk-1:1.6.0.0-5.1.13.3.el6_5
redhat/java<1.7.0-openjdk-1:1.7.0.55-2.4.7.2.el7_0
1.7.0-openjdk-1:1.7.0.55-2.4.7.2.el7_0
redhat/java<1.6.0-openjdk-1:1.6.0.0-6.1.13.3.el7_0
1.6.0-openjdk-1:1.6.0.0-6.1.13.3.el7_0
redhat/java<1.6.0-ibm-1:1.6.0.16.0-1jpp.1.el5
1.6.0-ibm-1:1.6.0.16.0-1jpp.1.el5
redhat/java<1.7.0-ibm-1:1.7.0.7.0-1jpp.1.el5_10
1.7.0-ibm-1:1.7.0.7.0-1jpp.1.el5_10
redhat/java<1.6.0-ibm-1:1.6.0.16.0-1jpp.1.el5_10
1.6.0-ibm-1:1.6.0.16.0-1jpp.1.el5_10
redhat/java<1.5.0-ibm-1:1.5.0.16.6-1jpp.1.el5_10
1.5.0-ibm-1:1.5.0.16.6-1jpp.1.el5_10
redhat/java<1.7.0-ibm-1:1.7.0.7.0-1jpp.1.el6_5
1.7.0-ibm-1:1.7.0.7.0-1jpp.1.el6_5
redhat/java<1.6.0-ibm-1:1.6.0.16.0-1jpp.1.el6_5
1.6.0-ibm-1:1.6.0.16.0-1jpp.1.el6_5
redhat/java<1.5.0-ibm-1:1.5.0.16.6-1jpp.1.el6_5
1.5.0-ibm-1:1.5.0.16.6-1jpp.1.el6_5
redhat/java<1.7.1-ibm-1:1.7.1.1.0-1jpp.2.el7_0
1.7.1-ibm-1:1.7.1.1.0-1jpp.2.el7_0
redhat/icedtea<1.13.3
1.13.3
redhat/icedtea<2.4.7
2.4.7
ORACLE OpenJDK=1.6.0
ORACLE OpenJDK=1.7.0
ORACLE OpenJDK=1.8.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.7.0-oracle-1:1.7.0.55-1jpp.2.el5_10
  2. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.6.0-sun-1:1.6.0.75-1jpp.3.el5_10
  3. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.7.0-oracle-1:1.7.0.55-1jpp.1.el6_5
  4. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.6.0-sun-1:1.6.0.75-1jpp.1.el6_5
  5. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.7.0-openjdk-1:1.7.0.55-2.4.7.1.el5_10
  6. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.6.0-openjdk-1:1.6.0.0-5.1.13.3.el5_10
  7. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.7.0-openjdk-1:1.7.0.55-2.4.7.1.el6_5
  8. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.6.0-openjdk-1:1.6.0.0-5.1.13.3.el6_5
  9. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.7.0-openjdk-1:1.7.0.55-2.4.7.2.el7_0
  10. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.6.0-openjdk-1:1.6.0.0-6.1.13.3.el7_0
  11. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.6.0-ibm-1:1.6.0.16.0-1jpp.1.el5
  12. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.7.0-ibm-1:1.7.0.7.0-1jpp.1.el5_10
  13. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.6.0-ibm-1:1.6.0.16.0-1jpp.1.el5_10
  14. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.5.0-ibm-1:1.5.0.16.6-1jpp.1.el5_10
  15. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.7.0-ibm-1:1.7.0.7.0-1jpp.1.el6_5
  16. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.6.0-ibm-1:1.6.0.16.0-1jpp.1.el6_5
  17. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.5.0-ibm-1:1.5.0.16.6-1jpp.1.el6_5
  18. Upgrade

    Upgrade redhat/java to a version that resolves this vulnerability.

    Fixed in 1.7.1-ibm-1:1.7.1.1.0-1jpp.2.el7_0
  19. Upgrade

    Upgrade redhat/icedtea to a version that resolves this vulnerability.

    Fixed in 1.13.3
  20. Upgrade

    Upgrade redhat/icedtea to a version that resolves this vulnerability.

    Fixed in 2.4.7

Event History

Feb 3, 2014
CVE Published
12:00 AM
Feb 10, 2014
CVE Published
via MITRE·11:00 PM
Data Sourced
via MITRE·11:00 PM
Description
Data Sourced
via NVD·11:55 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2014-1876?

CVE-2014-1876 has a medium severity level due to its potential impact on security when the unpack200 program mishandles log files.

2

How do I fix CVE-2014-1876?

To fix CVE-2014-1876, update the OpenJDK package to the latest version as specified in the remediation details.

3

Which versions are affected by CVE-2014-1876?

CVE-2014-1876 affects OpenJDK versions 1.6.0 and 1.7.0 prior to the security updates.

4

Is CVE-2014-1876 related to specific distributions?

Yes, CVE-2014-1876 impacts specific Red Hat distributions and versions of OpenJDK as detailed in the vulnerability report.

5

What should I monitor after addressing CVE-2014-1876?

After addressing CVE-2014-1876, monitor your systems for any anomalous behavior related to the unpack200 program.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203