Bug 442556

Summary: audit rules with >= get corrupted
Product: Red Hat Enterprise Linux 5 Reporter: Steve Grubb <sgrubb>
Component: auditAssignee: Steve Grubb <sgrubb>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: high    
Version: 5.2CC: ebenes
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHEA-2008-0358 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 14:32:59 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:
Attachments:
Description Flags
patch fixing problems described herein none

Description Steve Grubb 2008-04-15 15:00:18 UTC
Description of problem:
Audit rules with >= get converted to != by libaudit. For example, the rule:
auditctl -a always,exit -S open -F 'auid>=500'

when you run auditctl -l, the was sent into the kernel as auid!=500 which is not
what is intended.

Also, there is a memory leak on EOE records. The 5.3 kernel will start sending
EOE records so this should be fixed in case they upgrade the kernel and not the
audit daemon.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Steve Grubb 2008-04-17 13:47:29 UTC
Created attachment 302748 [details]
patch fixing problems described herein

This is the proposed patch.

Comment 4 Steve Grubb 2008-04-20 21:22:50 UTC
audit-1.6.5-9.el5 was built to address this problem.

Comment 6 Eduard Benes 2008-04-22 13:58:59 UTC
Steve, I'm not able to reproduce the '!=' bug using older audit packages. Do 
you have any idea what could be causing this? Here is a log using old audit-
1.6.5-6.el5 packages, it should FAIL but as you can see it passes on all archs. 
Tried 1.6.5-{6,7,8,9} and all passed.

Sample log:

Linux xxxxxxx.redhat.com 2.6.18-83.el5 #1 SMP Thu Feb 21 12:14:23 EST 2008 i686 
i686 i386 GNU/Linux
Tue Apr 22 15:47:28 CEST 2008
----
audit-1.6.5-6.el5
sudo-1.6.8p12-12.el5

===== Running Test /CoreOS/audit/bugzilla/bug442556 =====
Stopping auditd:                                           [  OK  ]
Starting auditd:                                           [  OK  ]

+ auditctl -D
No rules
+ auditctl -a always,exit -S open -F 'auid>=500'
+ auditctl -l
LIST_RULES: exit,always auid>=500 (0x1f4) syscall=open
+ set +x

===== Test /CoreOS/audit/bugzilla/bug442556 Finished =====

Test result               [ PASS ]


Comment 7 Steve Grubb 2008-04-22 14:43:19 UTC
Try this:

auditctl -a always,exit -S open -F 'auid>=500' -F auid!=4294967295 -k open

Comment 10 errata-xmlrpc 2008-05-21 14:32:59 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/RHEA-2008-0358.html