-
Notifications
You must be signed in to change notification settings - Fork 37
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: ILP32 (ARM's take on x32) is not audited properly #131
Comments
the ILP32 whitepaper from https://developer.arm.com/documentation/dai0490/latest/
|
From the ILP32 whitepaper:
... which means that ILP32 is basically the ARM version of x32. Which is pretty much just the worst thing ever; x32 needed to die a painful death and my initial thought is that ILP32 deserves the same fate. @weiyuchen we will add this to the queue to investigate but it may take a while; if you are interested in working on it you are always welcome to submit patches. |
OK, thx, I'd like to try to fix this problem |
That would be great, thanks! |
Not sure you received a notification from github. Please feel free to comment: |
@YuryNorov I think it would be best to decide where you want to discuss this, either here on GH or on LKML, please do not do both. Further, if you want me to comment on LKML you should add me to the To/CC line, like many folks I do not read every LKML posting ... actually, check that, it looks like I'm not even subscribed to LKML anymore. |
I found this email in your profile: paul@paul-moore.com |
Yes, that is fine with me. My apologies, it has been a busy week. |
@YuryNorov I've investigaed all syscalls used by ILP32 application, I find that all the syscalls are same as aarch64, so I'd like to know if I rollback the commit 0fe4141ba63a5dfd425c6d2dd9d8cbafd3497946 locally, if there will be some unknowable problem that impact other parts of kernel? (because recently I find similar problem of seccomp, which filter the syscall failed.) |
Weiyuchen, can you point me to a tree with the commit you mentioned. My tree is here: I |
oh, I'm sorry, the commit name is: |
Again, can you please share the link to your repository? |
Hi Yury, I guess what Yuchen just mentioned is in this link: norov/linux@2312ac1 |
https://gitee.com/openeuler/kernel/tree/OLK-5.10/ |
If you roll it back, the seccomp and ptrace will not be able to distinguish between aarch32 and ilp32. Generally, I walked thru the audit_classify logic, and it looks correct, and there's no recent changes in basic logic. One exception is the patch 0223fad ("audit: enforce op for string fields"), so maybe you'd look at there. Can you share LTP results? Without that, or better an access to a victim system, I can't say much more. Thanks, |
Ok, I will show you the LTP results in detail. -w /etc/shadow -p wa -k identity 2、the test file open.c is int test(const int argc, const char **argv)
{
int fd = open("/etc/shadow", O_WRONLY | O_APPEND);
if (fd < 0)
return 1;
close(fd);
return 0;
} 3、if the program is build in ilp32 format, when execute the open_ilp32, no audit log will be generated
for ilp32 and aarch64 program, I both get the same syscall number 56 (which is openat in 64bit syscall table), but the arch is different. Generally,
|
Further more, I want to know that in
if it means that ilp32 programs use aarch64 syscalls, if so, whether adding Thanks |
I use ILP32 program on 5.10 kernel Recently, and I find that I can't recored log in some case, here is a example:
I set one rule on the system:
my test program's core func is:
when I use 64 bit program to access /etc/shadow, I can get audit log rightly
but when I use ILP32 program, I can't get any audit log
I analyse this problem for days, and I find it's due to this commit:
Beacuse of ILP32 program use 64 bit syscall in most case
(according to the arm ilp32 Documents:)
when audit enter
audit_classify_syscall
function, it turns to a branch different from the kernel without AUDIT_ARCH_AARCH64ILP32 defination, however the syscall num on both kernel is same, so audit can't recognize the 64 bit syscall num when it runs to 32ILP branchThe text was updated successfully, but these errors were encountered: