Bug 869555 - ausearch -i does not interpret execve arguments when aN_len=nbytes is encountered
ausearch -i does not interpret execve arguments when aN_len=nbytes is encount...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: audit (Show other bugs)
6.3
Unspecified Linux
medium Severity low
: rc
: ---
Assigned To: Steve Grubb
Martin Žember
:
Depends On:
Blocks: 947775 1070830
  Show dependency treegraph
 
Reported: 2012-10-24 04:53 EDT by Burn Alting
Modified: 2015-07-13 00:14 EDT (History)
7 users (show)

See Also:
Fixed In Version: audit-2.3.7-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-10-14 03:14:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Burn Alting 2012-10-24 04:53:55 EDT
Description of problem:
When arguements to audit execve are too long, they are split up into multiple execve records. The based execve audit record adds a key value pair of aN_len=nbytes where N is the argument number and nbytes is the total number of bytes in the argument that has been split up.

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

How reproducible:
Easily.


Steps to Reproduce:
1. Generate an audit event where multiple execve audit records are generated - perhaps an execution of man
2. Run ausearch -i -if audit.log
3. View the mis-interpretation of the nbytes value of the aN_len=nbytes key value pair.
  
Actual results:
Dependant on nbytes value

Expected results:
aN_len value should be interpreted as an integer rather than a string.

Additional info:
I expect you need to modify the lookup routine that types the key values
Comment 2 Steve Grubb 2012-11-29 09:28:45 EST
Fixed upstream...Committed revision 723.
Comment 3 RHEL Product and Program Management 2013-10-13 20:20:58 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 5 Steve Grubb 2014-06-03 21:59:34 EDT
audit-2.3.7-1.el6 was built to resolve this issue.
Comment 7 Martin Žember 2014-06-20 09:00:16 EDT
Is it possible the version which contains this bug or more detailed steps to reproduce it?

I tried these versions:
audit-2.2-4.el6_5
audit.2.2-2.el6
audit-2.3.3-4.el7.x86_64

I tried these steps to reproduce:
auditctl -a exit,always -F arch=b32 -S execve
man aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
ausearch -i -if /var/log/audit/audit.log | grep len
auditctl -d exit,always -F arch=b32 -S execve

The output of ausearch does not contain any "_len" though. Maybe I am not able to produce a splitted entry in audit log?
Comment 8 Burn Alting 2014-06-20 18:37:29 EDT
(In reply to Martin Žember from comment #7)
> Is it possible the version which contains this bug or more detailed steps to
> reproduce it?
> 
> I tried these versions:
> audit-2.2-4.el6_5
> audit.2.2-2.el6
> audit-2.3.3-4.el7.x86_64
> 
> I tried these steps to reproduce:
> auditctl -a exit,always -F arch=b32 -S execve
> man
> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa a a a a a a
> a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
> ausearch -i -if /var/log/audit/audit.log | grep len
> auditctl -d exit,always -F arch=b32 -S execve
> 
> The output of ausearch does not contain any "_len" though. Maybe I am not
> able to produce a splitted entry in audit log?

Martin,

This was fixed in 2.2.2 as per the release notes
- Don't interpret aN_len field in EXECVE records (#869555)
found in https://people.redhat.com/sgrubb/audit/ChangeLog
Comment 10 Martin Žember 2014-06-24 09:01:55 EDT
Thank you, Burn.

It seems that the problem was also that I was not providing an argument that was big enough. Running "man `perl -e "print 'a'x10000"`" triggered it. Steve Grubb found that the length should be at least about 8560.
Comment 14 errata-xmlrpc 2014-10-14 03:14:06 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1515.html

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