Bug 582068 (CVE-2010-1488) - CVE-2010-1488 kernel: oom: fix the unsafe usage of badness() in proc_oom_score()
Summary: CVE-2010-1488 kernel: oom: fix the unsafe usage of badness() in proc_oom_score()
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2010-1488
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 579408 582069
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-14 02:07 UTC by Eugene Teo (Security Response)
Modified: 2013-07-23 22:16 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-23 22:16:52 UTC


Attachments (Terms of Use)

Description Eugene Teo (Security Response) 2010-04-14 02:07:28 UTC
Description of problem:
proc_oom_score(task) has a reference to task_struct, but that is all. If this task was already released before we take tasklist_lock
    
- we can't use task->group_leader, it points to nowhere
    
- it is not safe to call badness() even if this task is ->group_leader, has_intersects_mems_allowed() assumes it is safe to iterate over ->thread_group list.
    
- even worse, badness() can hit ->signal == NULL
    
Add the pid_alive() check to ensure __unhash_process() was not called.
    
Also, use "task" instead of task->group_leader. badness() should return the same result for any sub-thread. Currently this is not true, but this should be changed anyway.

Upstream commit:
http://git.kernel.org/linus/b95c35e76b29ba812e5dabdd91592e25ec640e93

Comment 1 Eugene Teo (Security Response) 2010-04-14 02:09:27 UTC
Statement:

Not vulnerable. The Linux kernel as shipped with with Red Hat Enterprise Linux 3, 4, 5 and Red Hat Enterprise MRG did not include upstream commit 28b83c51 (v2.6.32-rc1) that introduced the problem.

Comment 4 Vincent Danen 2010-04-20 22:43:14 UTC
This has been assigned CVE-2010-1488


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