Bug 563091 (CVE-2010-0622) - CVE-2010-0622 kernel: futex: Handle user space corruption gracefully
Summary: CVE-2010-0622 kernel: futex: Handle user space corruption gracefully
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2010-0622
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=moderate,source=lkml,reported=...
Depends On: 480396 563092 563093 563094 563095
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-09 07:52 UTC by Eugene Teo (Security Response)
Modified: 2019-06-08 12:55 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-28 08:36:51 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0161 normal SHIPPED_LIVE Important: kernel-rt security and bug fix update 2010-03-23 15:42:25 UTC
Red Hat Product Errata RHSA-2010:0504 normal SHIPPED_LIVE Important: kernel security and bug fix update 2010-07-01 18:26:58 UTC

Description Eugene Teo (Security Response) 2010-02-09 07:52:44 UTC
Description of problem:
If the owner of a PI futex dies we fix up the pi_state and set pi_state->owner to NULL. When a malicious or just sloppy programmed user space application sets the futex value to 0 e.g. by calling pthread_mutex_init(), then the futex can be acquired again. A new waiter manages to enqueue itself on the pi_state w/o damage, but on unlock the kernel dereferences pi_state->owner and oopses.
    
Prevent this by checking pi_state->owner in the unlock path. If pi_state->owner is not current we know that user space manipulated the futex value. Ignore the mess and return -EINVAL.
    
This catches the above case and also the case where a task hijacks the futex by setting the tid value and then tries to unlock it.

Upstream commit:
http://git.kernel.org/linus/51246bfd189064079c54421507236fd2723b18f3

Note that pi-futex was introduced in:
http://git.kernel.org/linus/c87e2837be82df479a6bae9f155c43516d2feebc

Comment 2 Eugene Teo (Security Response) 2010-02-09 07:56:50 UTC
Note that Red Hat Enterprise Linux 3 and 4 did not backport the support for priority-inheriting futex, and therefore not affected by this.

Comment 3 Kyle McMartin 2010-02-09 13:44:48 UTC
Thanks, just committed to Fedora for 2.6.3{0,1,2}.

Comment 4 Fedora Update System 2010-02-09 22:14:30 UTC
kernel-2.6.31.12-174.2.17.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/kernel-2.6.31.12-174.2.17.fc12

Comment 5 Fedora Update System 2010-02-11 11:34:16 UTC
kernel-2.6.30.10-105.2.23.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/kernel-2.6.30.10-105.2.23.fc11

Comment 6 Fedora Update System 2010-02-11 12:03:38 UTC
kernel-2.6.31.12-174.2.19.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/kernel-2.6.31.12-174.2.19.fc12

Comment 7 Fedora Update System 2010-02-12 04:47:51 UTC
kernel-2.6.30.10-105.2.23.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2010-02-16 13:17:34 UTC
kernel-2.6.31.12-174.2.19.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 errata-xmlrpc 2010-03-23 15:42:40 UTC
This issue has been addressed in following products:

  MRG for RHEL-5

Via RHSA-2010:0161 https://rhn.redhat.com/errata/RHSA-2010-0161.html

Comment 10 errata-xmlrpc 2010-07-01 18:27:47 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0504 https://rhn.redhat.com/errata/RHSA-2010-0504.html

Comment 11 Eugene Teo (Security Response) 2011-03-16 03:50:32 UTC
https://bugzilla.kernel.org/show_bug.cgi?id=15160


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