Red Hat Bugzilla – Bug 459499
proc_loginuid_write() uses simple_strtoul() on non-terminated array
Last modified: 2013-09-29 22:08:10 EDT
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):
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
Depends on what is in the kernel buffer.
Should always set it to what we called it with.
I think you are right, we need the unchanged upstream
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
Committed in 89.6.EL . RPMS are available at http://people.redhat.com/vgoyal/rhel4/
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.