Bug 492166 - Problem with filtering based on auid
Problem with filtering based on auid
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: audit (Show other bugs)
4.7
All Linux
urgent Severity urgent
: rc
: ---
Assigned To: Steve Grubb
BaseOS QE
: ZStream
Depends On:
Blocks: 557032
  Show dependency treegraph
 
Reported: 2009-03-25 13:38 EDT by Michal Marciniszyn
Modified: 2014-02-10 18:03 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 12:15:54 EDT
Type: ---
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 Michal Marciniszyn 2009-03-25 13:38:00 EDT
Description of problem:
On PPC, i386 and s390 architecture, whenever an user gets auid -1 (i.e. cat /proc/self/ returns 4294967295) filtering of the syscalls based on auid=4294967295 does not work. OTOH it works with no problems on IA64, x86_64 and s390x.

Version-Release number of selected component (if applicable):
kernel-2.6.9-78.0.17.EL
audit-1.0.16-3.el4_7.1

How reproducible:
always

Steps to Reproduce:
1. Get loginuid -1 on any of those arch.
2. auditctl -d exit,always -S <syscall> -F auid=4294967295
3. use the syscall
4. check that there is the log about the syscall in the /var/log/audit/audit.log

- or -
use audit-test from kernel/security/audit, namely filter part, test process_attrs
  
Actual results:
No log about syscall whenever -F auid=4294967295 is present. Correct log message present when -F auid=4294967295 is ommited.

Expected results:
log about the syscall in /var/log/audit/audit.log

Additional info:
Whenever user has ordinary login_uid (like 0), then it works perfectly.

Log from s390 without auid in the filter:
type=SYSCALL,CWD,PATH msg=audit(1238000396.640:342): arch=80000016 syscall=5 success=yes exit=3 a0=7ffffa97 a1=8000 a2=0 a3=1 items=1 pid=23977 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 comm=cat exe=/bin/cat cwd=/mnt/testarea/tests/kernel/security/audit/audit-test/audit-test/filter/tests rdev=00:00 ouid=0 dev=fd:00 flags=101 mode=0100600 name=/tmp/tmp.pbCMb23963 ogid=0 inode=641999
Comment 1 Eric Paris 2009-03-25 15:41:41 EDT
we are looking at it, but for now, we know you can use auid=-1 to get what you want.
Comment 2 Steve Grubb 2009-03-25 15:59:30 EDT
The source of the problem is in libaudit.c:

@@ -641,7 +641,7 @@ int audit_rule_fieldpair(struct audit_ru
                        vlen = strlen(v);
                        if (isdigit((char)*(v)))
                                rule->values[rule->field_count] =
-                                       strtol(v, NULL, 0);
+                                       strtoul(v, NULL, 0);
                        else if (vlen >= 2 && *(v)=='-' &&
                                                (isdigit((char)*(v+1))))
                                rule->values[rule->field_count] =

Need to build a new audit package. Btw, this same patch is needed in RHEL5 and rawhide.
Comment 3 RHEL Product and Program Management 2009-03-25 16:01:56 EDT
Since RHEL 4.8 External Beta has begun, and this bugzilla remains 
unresolved, it has been rejected as it is not proposed as exception or 
blocker.
Comment 9 Jiri Pallich 2012-06-20 12:15:54 EDT
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.

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