CVE-2015-0383: Medium severity Canonical Ubuntu Linux vulnerability
Multiple flaws were discovered in the way the Hotspot Java Virtual Machine, that is part of OpenJDK and Oracle Java SE, handled performance data temporary files. On Linux systems, these files are created in /tmp/hsperfdata<user> directories. However, the code did not properly check permissions and ownership of existing directories, making it possible for local attackers, able to create /tmp/hsperfdatavictim directory before victim user creates it, to remove or overwrite arbitrary files with the permissions of the victim user.
There already exists the function isdirectorysecure() that is used to check if existing /tmp/hsperfdata<user> directory is safe to use. It ensures it really is directory and that it isn't group or world writable. However, no ownership check is performed.
http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/file/f8795cb3f5c1/src/os/linux/vm/perfMemorylinux.cpp#l200
The missing ownership check, combined with a race to replace an attacker-owned hsperfdata directory with a symlink, can be used to remove arbitrary files in cleanupsharedmemresources() (which is called from mmapcreateshared()).
http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/file/f8795cb3f5c1/src/os/linux/vm/perfMemorylinux.cpp#l488
Arbitrary file overwrite is possible via createsharedmemresources() via a symlink in an attacker-owned hsperdatavictim directory.
http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/file/f8795cb3f5c1/src/os/linux/vm/perfMemorylinux.cpp#l601
This issue is partially mitigated by the fact that attacker needs to create /tmp/hsperdatavictim directory before victim user first runs JVM, as the hsperfdata directory is not removed on JVM exit, only JVM id / pid file is removed. On systems that use tmpfs for /tmp, or use other ways to clean up /tmp directory on every reboot, this mitigation is likely to have very limited impact.
Another way to mitigate this issue is to run java with -XX:-UsePerfData option, which disables the performance monitoring feature and prevents creation of hsperfdata directory and files. This prevents tools as jstat (JVM statistics monitoring tool) from being able to get performance data.
Other sources
Unspecified vulnerability in Oracle Java SE 5.0u75, 6u85, 7u72, and 8u25; Java SE Embedded 7u71 and 8u6; and JRockit R27.8.4 and R28.3.4 allows local users to affect integrity and availability via unknown vectors related to Hotspot.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/openjdk-8to a version that resolves this vulnerability.Fixed in 8u40~b22-1 - Upgrade
Upgrade
debian/openjdk-6to a version that resolves this vulnerability.Fixed in 6b34-1.13.6-1~deb6u1Fixed in 6b34-1.13.6-1~deb7u1Fixed in 6b34-1.13.6-1 - Upgrade
Upgrade
debian/openjdk-7to a version that resolves this vulnerability.Fixed in 7u75-2.5.4-1~deb7u1Fixed in 7u75-2.5.4-1 - Configuration
Run Java with -XX:-UsePerfData to disable performance monitoring and prevent creation of hsperfdata directories and files.
Java HotSpot JVM -XX:-UsePerfData = disabled
Event History
Frequently Asked Questions
What is the severity of CVE-2015-0383?
The severity of CVE-2015-0383 is not explicitly defined, but it can impact the integrity and availability of systems using affected Java versions.
How do I fix CVE-2015-0383?
To fix CVE-2015-0383, update your Java installation to the latest version recommended by Oracle or apply the latest available patches for your specific software environment.
Which software is affected by CVE-2015-0383?
CVE-2015-0383 affects multiple versions of Oracle Java SE, JRockit, and various Linux distributions including Ubuntu and Red Hat.
Can CVE-2015-0383 be exploited remotely?
CVE-2015-0383 is primarily a local vulnerability, meaning it requires local access to the system to be exploited.
What types of vectors are involved in CVE-2015-0383?
The specific vectors for CVE-2015-0383 are unspecified, but they are related to the Java Hotspot component.