Bug 459499 - proc_loginuid_write() uses simple_strtoul() on non-terminated array
Summary: proc_loginuid_write() uses simple_strtoul() on non-terminated array
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.4
Hardware: All
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Cong Wang
QA Contact: Evan McNabb
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-19 14:23 UTC by R. Keyes
Modified: 2013-09-30 02:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-16 15:56:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Source code to demonstrate the issue (242 bytes, application/octet-stream)
2008-08-19 14:23 UTC, R. Keyes
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0263 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 4.9 kernel security and bug fix update 2011-02-16 15:14:55 UTC

Description R. Keyes 2008-08-19 14:23:14 UTC
Created attachment 314547 [details]
Source code to demonstrate the issue

Description of problem:
Current RHEL kernel sources (2.6.9-78.0.1 at the time of this writing) have the earlier backported patch from 2.6.10 which allows the loginuid to be handled in proc. However, they do not have the patch from 2.6.17-rc5 that fixes the use of a non-terminated array in the proc_loginuid_write function. As such, multiple repeated calls to proc_loginuid_write code can result in invalid auid being assigned to the user.

Version-Release number of selected component (if applicable):


How reproducible:
Can take some time but repeatedly calling the affected code will eventually cause it (few minutes to an hour on my tested machines).

Steps to Reproduce:
1. Compile attached c program with "-laudit" options
2. Run compiled program as root and wait
3.
  
Actual results:
Depends on what is in the kernel buffer.

Expected results:
Should always set it to what we called it with.

Additional info:
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17-rc5/2.6.17-rc5-mm1/broken-out/git-audit-master.patch

Comment 1 Oleg Nesterov 2009-07-01 06:31:17 UTC
I think you are right, we need the unchanged upstream
e0182909297da8d38a5d473ae7bee3d0324632a1 commit.

Comment 2 RHEL Program Management 2009-07-13 13:23:47 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Vivek Goyal 2009-07-14 18:51:15 UTC
Committed in 89.6.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/

Comment 10 errata-xmlrpc 2011-02-16 15:56:26 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 therefore 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-2011-0263.html


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