CVE-2015-0239 - Improper Privilege Management

Severity

47%

Complexity

19%

Confidentiality

130%

The em_sysenter function in arch/x86/kvm/emulate.c in the Linux kernel before 3.18.5, when the guest OS lacks SYSENTER MSR initialization, allows guest OS users to gain guest OS privileges or cause a denial of service (guest OS crash) by triggering use of a 16-bit code segment for emulation of a SYSENTER instruction.

The em_sysenter function in arch/x86/kvm/emulate.c in the Linux kernel before 3.18.5, when the guest OS lacks SYSENTER MSR initialization, allows guest OS users to gain guest OS privileges or cause a denial of service (guest OS crash) by triggering use of a 16-bit code segment for emulation of a SYSENTER instruction.

CVSS 2.0 Base Score 4.7. CVSS Attack Vector: local. CVSS Attack Complexity: high. CVSS Vector: (AV:L/AC:H/Au:N/C:N/I:P/A:C).

CVSS 2.0 Base Score 4.4. CVSS Attack Vector: local. CVSS Attack Complexity: medium. CVSS Vector: (AV:L/AC:M/Au:N/C:P/I:P/A:P).

Demo Examples

Improper Privilege Management

CWE-269

This code temporarily raises the program's privileges to allow creation of a new user folder.


               
return True
return False#avoid CWE-22 and CWE-78
lowerPrivileges()
return False

While the program only raises its privilege level to create the folder and immediately lowers it again, if the call to os.mkdir() throws an exception, the call to lowerPrivileges() will not occur. As a result, the program is indefinitely operating in a raised privilege state, possibly allowing further exploitation to occur.

Improper Privilege Management

CWE-269

Evidence of privilege change:


               
seteuid(getuid());/* do some stuff */

               
}
// privileged code goes here, for example:// nothing to return

Improper Privilege Management

CWE-269

This code intends to allow only Administrators to print debug information about a system.


               
}
ADMIN,USER,GUEST
}
}
break;
break;
System.out.println("You must be logged in to perform this command");

While the intention was to only allow Administrators to print the debug information, the code as written only excludes those the with the role of "GUEST". Someone with the role of "ADMIN" or "USER" will be allowed access, which goes against the original intent. An attacker may be able to use this debug information to craft an attack on the system.

Improper Privilege Management

CWE-269

This code allows someone with the role of "ADMIN" or "OPERATOR" to reset a user's password. The role of "OPERATOR" is intended to have less privileges than an "ADMIN", but still be able to help users with small issues such as forgotten passwords.


               
}
ADMIN,OPERATOR,USER,GUEST
}
}
}
break;
break;
break;
System.out.println("You must be logged in to perform this command");

This code does not check the role of the user whose password is being reset. It is possible for an Operator to gain Admin privileges by resetting the password of an Admin account and taking control of that account.

Overview

Type

Linux

First reported 9 years ago

2015-03-02 11:59:00

Last updated 4 years ago

2020-05-21 14:19:00

Affected Software

Linux Kernel

Canonical Ubuntu Linux 12.04 LTS

12.04

Canonical Ubuntu Linux 14.04 LTS (Long-Term Support)

14.04

Canonical Ubuntu Linux 14.10

14.10

Debian Linux 7.0

7.0

Debian Linux 8.0 (Jessie)

8.0

Oracle Linux 7

7

Red Hat Enterprise Linux Desktop 6.0

6.0

Red Hat Enterprise Linux Server 6.0

6.0

Red Hat Enterprise Linux Workstation 6.0

6.0

References

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f3747379accba8e95d70cec0eae0582c8c182050

[bk-commits-head] 20150123 KVM: x86: SYSENTER emulation is broken

RHSA-2015:1272

DSA-3170

http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.5

MDVSA-2015:058

[oss-security] 20150127 KVM SYSENTER emulation vulnerability - CVE-2015-0239

http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html

http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html

72842

USN-2513-1

USN-2514-1

USN-2515-1

USN-2516-1

USN-2517-1

USN-2518-1

https://bugzilla.redhat.com/show_bug.cgi?id=1186448

https://github.com/torvalds/linux/commit/f3747379accba8e95d70cec0eae0582c8c182050

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f3747379accba8e95d70cec0eae0582c8c182050

Patch, Vendor Advisory

[bk-commits-head] 20150123 KVM: x86: SYSENTER emulation is broken

Broken Link

RHSA-2015:1272

Third Party Advisory

DSA-3170

Third Party Advisory

http://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.18.5

Release Notes, Vendor Advisory

MDVSA-2015:058

Third Party Advisory

[oss-security] 20150127 KVM SYSENTER emulation vulnerability - CVE-2015-0239

Exploit, Mailing List, Third Party Advisory

http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html

Third Party Advisory

http://www.oracle.com/technetwork/topics/security/linuxbulletinoct2015-2719645.html

Third Party Advisory

72842

Third Party Advisory, VDB Entry

USN-2513-1

Third Party Advisory

USN-2514-1

Third Party Advisory

USN-2515-1

Third Party Advisory

USN-2516-1

Third Party Advisory

USN-2517-1

Third Party Advisory

USN-2518-1

Third Party Advisory

https://bugzilla.redhat.com/show_bug.cgi?id=1186448

Issue Tracking, Third Party Advisory

https://github.com/torvalds/linux/commit/f3747379accba8e95d70cec0eae0582c8c182050

Patch, Third Party Advisory

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.