Bug 645222 (CVE-2010-3858)

Summary: CVE-2010-3858 kernel: setup_arg_pages: diagnose excessive argument size
Product: [Other] Security Response Reporter: Eugene Teo (Security Response) <eteo>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: arozansk, bhu, davej, dhoward, fhrbata, jkacur, jolsa, jpirko, kmcmartin, lgoncalv, lwang, nixon, onestero, pbenas, plyons, pmatouse, tcallawa, vgoyal, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-28 08:44:14 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: 645223, 645224, 645225, 645226, 645227, 645228, 645229    
Bug Blocks:    

Description Eugene Teo (Security Response) 2010-10-21 03:52:21 UTC
Description of problem:
The CONFIG_STACK_GROWSDOWN variant of setup_arg_pages() does not check the size of the argument/environment area on the stack. When it is unworkably large, shift_arg_pages() hits its BUG_ON. This is exploitable with a very large RLIMIT_STACK limit, to create a crash pretty easily.
    
Check that the initial stack is not too large to make it possible to map in any executable.  We're not checking that the actual executable (or intepreter, for binfmt_elf) will fit.  So those mappings might clobber part of the initial stack mapping.  But that is just userland lossage that userland made happen, not a kernel problem.

Upstream commit:
http://git.kernel.org/linus/1b528181b2ffa14721fb28ad1bd539fe1732c583

Reference:
http://grsecurity.net/~spender/64bit_dos.c

Acknowledgements:

Red Hat would like to thank Brad Spengler for reporting this issue.

Comment 2 errata-xmlrpc 2010-12-08 19:09:27 UTC
This issue has been addressed in following products:

  MRG for RHEL-5

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

Comment 3 errata-xmlrpc 2011-01-04 16:52:39 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2011:0004 https://rhn.redhat.com/errata/RHSA-2011-0004.html

Comment 4 Eugene Teo (Security Response) 2011-01-27 06:55:23 UTC
Statement:

This issue did not affect the versions of Linux kernel as shipped with Red Hat
Enterprise Linux 4 as they did not backport the upstream commit b6a2fea3 that introduced the issue. This was addressed in Red Hat Enterprise Linux 5 and Red Hat Enterprise MRG via https://rhn.redhat.com/errata/RHSA-2011-0004.html and 
https://rhn.redhat.com/errata/RHSA-2010-0958.html. Future kernel updates in Red Hat Enterprise Linux 6 may address this flaw.

Comment 7 errata-xmlrpc 2011-06-01 19:56:58 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2011:0836 https://rhn.redhat.com/errata/RHSA-2011-0836.html