Skip to contentSkip to conversation

Why there is no PATH record for change file time syscalls ?(utimensat)

DISCUSSION Lev Olshvang 3 participants 6 messages Sep 6, 2017 – Sep 8, 2017

lore
Share & tools
lore
#1 lore raw
Quoted 2 lines · EDT Lev Olshvang

I got only following SYSCALL record in audit log for 'touch -t ' command, no CWD, no PATH record

Out of curiosity, what kind of rule were you using?

Quoted 5 lines

type=SYSCALL msg=audit(1503837757.149:266995):
arch=c000003e syscall=280 success=yes exit=0 a0=0 a1=0 a2=7fffbb26bb10 a3=0 items=0 ppid=101 pid=102 auid=1000 uid=0 gid=31 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts4 ses=1 comm="touch" exe="/bin/touch" key="times"

I think you found a problem. I also think the syscall should be added to:

include/asm-generic/audit_change_attr.h

I think this syscall and others have been added since the watch permissions files were setup.

-Steve

#2 lore raw
Quoted 12 lines · Steve Grubb
Quoted 2 lines · EDT Lev Olshvang

I got only following SYSCALL record in audit log for 'touch -t ' command, no CWD, no PATH record

Out of curiosity, what kind of rule were you using?

Quoted 5 lines

type=SYSCALL msg=audit(1503837757.149:266995):
arch=c000003e syscall=280 success=yes exit=0 a0=0 a1=0 a2=7fffbb26bb10 a3=0 items=0 ppid=101 pid=102 auid=1000 uid=0 gid=31 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts4 ses=1 comm="touch" exe="/bin/touch" key="times"

Quoted 3 lines

I think you found a problem. I also think the syscall should be added to:

include/asm-generic/audit_change_attr.h

Steve, my naive addition of utime, utimes, futimesat and utimensat to include/asm-generic/audit_change_attr.h seems to have made no difference.

Quoted 4 lines

I think this syscall and others have been added since the watch permissions files were setup.

-Steve

- RGB

--
Richard Guy Briggs <[email protected]>
Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635

#3 lore raw
Quoted 13 lines · EDT Richard Guy Briggs
Quoted 12 lines · Steve Grubb
Quoted 2 lines · EDT Lev Olshvang

I got only following SYSCALL record in audit log for 'touch -t ' command, no CWD, no PATH record

Out of curiosity, what kind of rule were you using?

Quoted 5 lines

type=SYSCALL msg=audit(1503837757.149:266995):
arch=c000003e syscall=280 success=yes exit=0 a0=0 a1=0 a2=7fffbb26bb10 a3=0 items=0 ppid=101 pid=102 auid=1000 uid=0 gid=31 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts4 ses=1 comm="touch" exe="/bin/touch" key="times"

Quoted 7 lines
Quoted 3 lines

I think you found a problem. I also think the syscall should be added to:

include/asm-generic/audit_change_attr.h

Steve, my naive addition of utime, utimes, futimesat and utimensat to include/asm-generic/audit_change_attr.h seems to have made no difference.

There seems to be 2 problems. 1) the utimensat syscall not getting a path record, 2) you can't use the -F perms=a because the syscall tables seem to be way out of date. fchmodat seems to be the last syscall added. There's about 70 new syscalls that need to be looked through and added. This is the easier of the 2 problems.

-Steve

Quoted 13 lines
Quoted 4 lines

I think this syscall and others have been added since the watch permissions files were setup.

-Steve

- RGB

--
Richard Guy Briggs <[email protected]>
Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635

#4 lore raw
Quoted 22 lines · Steve Grubb
Quoted 13 lines · EDT Richard Guy Briggs
Quoted 12 lines · Steve Grubb
Quoted 2 lines · EDT Lev Olshvang

I got only following SYSCALL record in audit log for 'touch -t ' command, no CWD, no PATH record

Out of curiosity, what kind of rule were you using?

Quoted 5 lines

type=SYSCALL msg=audit(1503837757.149:266995):
arch=c000003e syscall=280 success=yes exit=0 a0=0 a1=0 a2=7fffbb26bb10 a3=0 items=0 ppid=101 pid=102 auid=1000 uid=0 gid=31 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts4 ses=1 comm="touch" exe="/bin/touch" key="times"

Quoted 7 lines
Quoted 3 lines

I think you found a problem. I also think the syscall should be added to:

include/asm-generic/audit_change_attr.h

Steve, my naive addition of utime, utimes, futimesat and utimensat to include/asm-generic/audit_change_attr.h seems to have made no difference.

Quoted 5 lines

There seems to be 2 problems. 1) the utimensat syscall not getting a path record, 2) you can't use the -F perms=a because the syscall tables seem to be way out of date. fchmodat seems to be the last syscall added. There's about 70 new syscalls that need to be looked through and added. This is the easier of the 2 problems.

Ok, please file a github audit kernel issue with as much detail as you can. This appears to be an upstream issue.

Quoted 8 lines

-Steve

Quoted 6 lines
Quoted 4 lines

I think this syscall and others have been added since the watch permissions files were setup.

-Steve

- RGB

- RGB

--
Richard Guy Briggs <[email protected]>
Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635

#5 lore raw
In reply to Steve Grubb
Quoted 5 lines · EDT Steve Grubb
Quoted 2 lines · EDT Lev Olshvang

I got only following SYSCALL record in audit log for 'touch -t ' command, no CWD, no PATH record

Out of curiosity, what kind of rule were you using?

Also, which kernel are you seeing this on? I get full reporting on 4.11.12

-Steve

Quoted 20 lines
Quoted 6 lines

type=SYSCALL msg=audit(1503837757.149:266995):
arch=c000003e syscall=280 success=yes exit=0 a0=0 a1=0 a2=7fffbb26bb10 a3=0
items=0 ppid=101 pid=102 auid=1000 uid=0 gid=31 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts4 ses=1 comm="touch" exe="/bin/touch" key="times"

I think you found a problem. I also think the syscall should be added to:

include/asm-generic/audit_change_attr.h

I think this syscall and others have been added since the watch permissions files were setup.

-Steve

--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit