Bug 582068 (CVE-2010-1488)

Summary: CVE-2010-1488 kernel: oom: fix the unsafe usage of badness() in proc_oom_score()
Product: [Other] Security Response Reporter: Eugene Teo (Security Response) <eteo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: arozansk, davej, kmcmartin, lwang, onestero, tcallawa, vdanen
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-23 22:16:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 579408, 582069    
Bug Blocks:    

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