Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: intermediate directories missing in audit PATH records #163

Open
naugustine98 opened this issue Jul 3, 2024 · 6 comments
Open

BUG: intermediate directories missing in audit PATH records #163

naugustine98 opened this issue Jul 3, 2024 · 6 comments
Assignees
Labels

Comments

@naugustine98
Copy link

Environment

OS: Centos 7
Kernel: 3.10.0-1160.108.1.el7.x86_64
Audit: 2.8.5

Rules

$ sudo auditctl -l
-w /home/nid/audittest -p wa -k audittest

Operation

$ pwd
/home/nid/audittest
$ ls
kernel
$ ls kernel/
audit
$ ls kernel/audit/
testfile
$ rm -rf kernel

Audit Records

type=PROCTITLE msg=audit(07/03/2024 11:39:20.891:23602221) : proctitle=rm -rf kernel
type=PATH msg=audit(07/03/2024 11:39:20.891:23602221) : item=1 name=testfile inode=201714147 dev=fd:00 mode=file,664 ouid=nid ogid=nid rdev=00:00 obj=unconfined_u:object_r:user_home_t:s0 objtype=DELETE cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=PATH msg=audit(07/03/2024 11:39:20.891:23602221) : item=0 name=/home/nid/audittest inode=201714144 dev=fd:00 mode=dir,775 ouid=nid ogid=nid rdev=00:00 obj=unconfined_u:object_r:user_home_t:s0 objtype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=CWD msg=audit(07/03/2024 11:39:20.891:23602221) :  cwd=/home/nid/audittest
type=SYSCALL msg=audit(07/03/2024 11:39:20.891:23602221) : arch=x86_64 syscall=unlinkat success=yes exit=0 a0=0x5 a1=0x15a46a8 a2=0x0 a3=0x7ffd31318a20 items=2 ppid=16898 pid=26549 auid=nid uid=nid gid=nid euid=nid suid=nid fsuid=nid egid=nid sgid=nid fsgid=nid tty=pts5 ses=10697 comm=rm exe=/usr/bin/rm subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=audittest

Expected Behavior

  • The parent directory should be coming as /home/nid/audittest/kernel/audit

Actual Behavior

  • The parent directory is coming as /home/nid/audittest

The same issue happens on this environment as well
OS: RHEL 9.3
Kernel: 5.14.0-362.13.1.el9_3.x86_64
Audit: 3.0.7

@pcmoore pcmoore changed the title Intermediate direcotries missing in audit records BUG: intermediate directories missing in audit PATH records Jul 3, 2024
@pcmoore pcmoore added the bug label Jul 3, 2024
@rwk141414
Copy link

I see this was marked as a bug in July but it appears that no on is assigned as yet. Is this being worked on?

@pcmoore
Copy link
Contributor

pcmoore commented Nov 12, 2024

I'm not aware of anyone working on this, are you interested?

It's possible that the work going on in the thread below may have an impact on this:

@rwk141414
Copy link

rwk141414 commented Nov 12, 2024 via email

@pcmoore
Copy link
Contributor

pcmoore commented Nov 12, 2024

As a reminder @rwk141414, we do not provide individual Linux distribution support here, especially for enterprise distributions with their own established support mechanisms. We're obviously very happy to hear about bugs, offers to help test, offers to work on fixing bugs (patches!), etc., but if you are a RHEL customer looking for RHEL support you should also contact your IBM/RH support representative.

@rprobaina
Copy link

I'm not aware of anyone working on this, are you interested?

It's possible that the work going on in the thread below may have an impact on this:

* https://lore.kernel.org/audit/[email protected]/

@pcmoore, I agree, it seems to be related to the same issue. I'll investigate it. Feel free to assign this issue to me, I don't have the project's permission to do so.

@pcmoore
Copy link
Contributor

pcmoore commented Nov 21, 2024

Done @rprobaina and thanks!

(related, I'll take a closer look at the GH perms to see if I can fix that, although last I checked they were too coarse)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants