Bug 1115927 (CVE-2014-4699) - CVE-2014-4699 kernel: x86_64: ptrace: sysret to non-canonical address
Summary: CVE-2014-4699 kernel: x86_64: ptrace: sysret to non-canonical address
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2014-4699
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact: xiaoli feng
URL:
Whiteboard:
Depends On: 1115932 1115933 1115934 1115935 1115936 1115941 1115942 1116477 1117226 1117227 1120840
Blocks: 1115839
TreeView+ depends on / blocked
 
Reported: 2014-07-03 11:02 UTC by Prasad Pandit
Modified: 2023-05-12 23:55 UTC (History)
38 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
It was found that the Linux kernel's ptrace subsystem allowed a traced process' instruction pointer to be set to a non-canonical memory address without forcing the non-sysret code path when returning to user space. A local, unprivileged user could use this flaw to crash the system or, potentially, escalate their privileges on the system. Note: The CVE-2014-4699 issue only affected systems using an Intel CPU.
Clone Of:
Environment:
Last Closed: 2014-07-23 17:46:04 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:0913 0 normal SHIPPED_LIVE Important: kernel-rt security update 2014-07-22 22:00:11 UTC
Red Hat Product Errata RHSA-2014:0923 0 normal SHIPPED_LIVE Important: kernel security update 2014-07-23 19:44:06 UTC
Red Hat Product Errata RHSA-2014:0924 0 normal SHIPPED_LIVE Important: kernel security update 2014-07-23 20:04:44 UTC
Red Hat Product Errata RHSA-2014:0925 0 normal SHIPPED_LIVE Important: kernel security update 2014-07-23 20:04:36 UTC
Red Hat Product Errata RHSA-2014:0949 0 normal SHIPPED_LIVE Important: kernel security update 2014-07-28 20:03:38 UTC

Description Prasad Pandit 2014-07-03 11:02:20 UTC
On Intel CPUs sysret to non-canonical address causes a fault on the sysret
instruction itself after the stack pointer is set to user mode provided value 
but before the CPL is changed. Systems running on AMD CPUs are not vulnerable to 
this issue as sysret on AMD CPUs does not generate a fault before the CPL change.

It was found that certain Linux kernel's ptrace subsystem code paths allow the
tracer to set tracee's instruction pointer to non-canonical address which is
later used on tracee's return to user mode via the sysret instruction,
effectively bypassing the hardening introduced via the fixes for CVE-2005-1764
(introduced guard page between the end of the user-mode accessible virtual
address space and the beginning of the non-canonical) and CVE-2006-0744 (system
call handler hardening).

An unprivileged local user could use this flaw to increase their privileges
on the system.

Upstream fix:
-------------
  -> https://git.kernel.org/linus/b9cd18de4db3c9ffa7e17b0dc0ca99ed5aa4d43a

Comment 4 Prasad Pandit 2014-07-04 06:51:51 UTC
Statement:

This issue does not affect the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 5.

Comment 8 Vincent Danen 2014-07-04 23:21:35 UTC
This is now public:

http://seclists.org/oss-sec/2014/q3/40

Comment 9 Vincent Danen 2014-07-04 23:24:44 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1116477]

Comment 10 Murray McAllister 2014-07-07 06:28:25 UTC
Acknowledgements:

Red Hat would like to thank Andy Lutomirski for reporting this issue.

Comment 13 Vasily Averin 2014-07-08 13:44:27 UTC
Dear Red Hat,
could you please explain why RHEL5 kernel is not affected?

Comment 14 Petr Matousek 2014-07-08 14:49:38 UTC
Hello, Vasily.

(In reply to Vasily Averin from comment #13)
> could you please explain why RHEL5 kernel is not affected?

Red Hat Enterprise Linux 5 uses utrace which sets TIF_SIGPENDING when stopping the tracee and that is why iret path is always taken on return to user space.

Hope that helps.

--
Petr Matousek / Red Hat Product Security

Comment 15 Fedora Update System 2014-07-11 02:02:36 UTC
kernel-3.15.4-200.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 errata-xmlrpc 2014-07-22 18:05:06 UTC
This issue has been addressed in following products:

  MRG for RHEL-6 v.2

Via RHSA-2014:0913 https://rhn.redhat.com/errata/RHSA-2014-0913.html

Comment 18 errata-xmlrpc 2014-07-23 15:44:24 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 7

Via RHSA-2014:0923 https://rhn.redhat.com/errata/RHSA-2014-0923.html

Comment 19 errata-xmlrpc 2014-07-23 16:05:56 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6.4 EUS - Server and Compute Node Only

Via RHSA-2014:0925 https://rhn.redhat.com/errata/RHSA-2014-0925.html

Comment 20 errata-xmlrpc 2014-07-23 16:06:17 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2014:0924 https://rhn.redhat.com/errata/RHSA-2014-0924.html

Comment 21 Martin Prpič 2014-07-24 12:23:25 UTC
IssueDescription:

It was found that the Linux kernel's ptrace subsystem allowed a traced process' instruction pointer to be set to a non-canonical memory address without forcing the non-sysret code path when returning to user space. A local, unprivileged user could use this flaw to crash the system or, potentially, escalate their privileges on the system.

Note: The CVE-2014-4699 issue only affected systems using an Intel CPU.

Comment 22 Fedora Update System 2014-07-25 10:08:22 UTC
kernel-3.14.13-100.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 errata-xmlrpc 2014-07-28 16:03:48 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6.2 AUS

Via RHSA-2014:0949 https://rhn.redhat.com/errata/RHSA-2014-0949.html


Note You need to log in before you can comment on or make changes to this bug.