-
Notifications
You must be signed in to change notification settings - Fork 214
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
syscall list update: Rename multiple syscalls to be up to date with kernel #389
base: master
Are you sure you want to change the base?
Conversation
This looks like a good update. One of the goals in naming things is to try to have the same syscall names on each arch so that the rules we ship are not arch dependent. And the other thing I've been trying to do is if you strace a process, you can use the same syscall names that you saw in the strace output to make your audit rules. We get reports that someone is not getting events. To troubleshoot it I have them run strace so they can update their rules. Also, do we need to change any rules that we ship to match the new names? |
I went through the list of changes and the followings are suspicious:
Whilst the first one is present in all supported architectures (plus there are rules for it), the second is not.
How should we proceed if a particular security standard includes rules that depend on architecture-specific system calls? |
Yes, this is the kind of problems a change could make. In this case, I wonder what strace shows? I know that there is a glibc wrapper that is clock_settime. The actual syscall is clock_settime64. But it doesn't have a man page. In cases like this, I was going with the glibc wrapper because Common Criteria has a rule that all syscall must be documented. We really want to point to the man page and not make busy work. Another issue is auparse/normalize_syscall_map.h It is used to match syscall names to categorize what kind of object the event is working with. Changes to anything need to be coordinated with that file also. One last point, if the auditd is in the enriched mode, it will translate the syscall number into the syscall name. It is impossible to undo. Once it's recorded, that's how it will be intepreted. It does not do a new lookup to see if it was correct. That could mean mismatches in the normalizer that used to work fine. Based on this, we might want to be very conservative so the whole world doesn't break. |
My guess is that both clock_settime and clock_settime64 are Y2038 safe and do the same thing internally, but don't have strong evidence except for some mailing list discussions.
arm, i386, ppc tables already contain
|
On Linux, the underlying system calls were renamed in Linux 2.6: pread() became pread64(), and pwrite() became pwrite64(). The system call numbers remained the same. The glibc pread() and pwrite() wrapper functions transparently deal with the change.
Source: arch/x86/entry/syscalls/syscall_32.tbl sched_rr_get_interval64 -> sched_rr_get_interval_time64 sys_kexec_load -> kexec_load
Source file: arch/arm/tools/syscall.tbl Add missing syscalls Correct names for existing ones
Source file: arch/s390/kernel/syscalls/syscall.tbl Added many missing syscalls
Source file: arch/s390/kernel/syscalls/syscall.tbl Added many missing syscalls
Source file: include/uapi/asm-generic/unistd.h
Source file: arch/powerpc/kernel/syscalls/syscall.tbl
I checked all relevant files from the kernel part mentioned in
lib/syscall-update.txt
.I haven't observed any significat updates on socketcall/ipccall.
Some notes:
arm_sync_file_range/sync_file_range, s390_guarded_storage
pread/pwrite
instead ofpread64/pwrite64
)