Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 160200 - CAN-2005-1768 64bit execve() race leads to buffer overflow
Summary: CAN-2005-1768 64bit execve() race leads to buffer overflow
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel
Version: 2.1
Hardware: ia64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Don Howard
QA Contact: Brian Brock
URL:
Whiteboard: source=secalert,reported=20050612,imp...
Depends On:
Blocks: 143573
TreeView+ depends on / blocked
 
Reported: 2005-06-13 10:48 UTC by Mark J. Cox
Modified: 2007-11-30 22:06 UTC (History)
1 user (show)

Fixed In Version: RHSA-2005-551
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-08-25 13:18:55 UTC


Attachments (Terms of Use)
Proposed patch from Andi Kleen (deleted)
2005-06-13 10:48 UTC, Mark J. Cox
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:551 normal SHIPPED_LIVE Important: kernel security update 2005-08-25 04:00:00 UTC

Description Mark J. Cox 2005-06-13 10:48:19 UTC
Reported to secalert@redhat.com by Ilja van Sprundel, a race condition in execve
affecting x86_64 and ia64 which exists because kmalloc() or get_user() can
block, and hence another thread can change the argv and envp pointers, causing a
bufferoverflow (also on SMP without blocking)

          na = nargs(argv, NULL);
 ...      ne = nargs(envp, NULL);
 ...      len = (na + ne + 2) * sizeof(*av);
 ...      av = kmalloc(len, GFP_KERNEL);
 ...      r = nargs(argv, av);
 ...      r = nargs(envp, ae);

"the nargs() function is used to first count the amount of argv and
envp pointers, next a kmalloc() is done, and then nargs() is called again to
copy the argv and envp pointer into this newly allocated memory.        the race
condition exists because kmalloc() or get_user() can block, and hence another
thread can change the argv and envp pointers, causing a buffer overflow."

Currently embargoed

Comment 1 Mark J. Cox 2005-06-13 10:48:20 UTC
Created attachment 115348 [details]
Proposed patch from Andi Kleen

Comment 5 Mark J. Cox 2005-07-07 22:13:24 UTC
Fixed in 2.4.32-pre1, therefore no need to treat as embargoed.

Comment 6 Mark J. Cox 2005-07-08 09:14:38 UTC
Public 20050704

Comment 11 Red Hat Bugzilla 2005-08-25 13:18:56 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-551.html



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