Created
July 22, 2015 13:27
-
-
Save Blub/bb55648798dc86bc056b to your computer and use it in GitHub Desktop.
libseccomp and 32 bit binaries on 64 bit hosts = bad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat umount.c | |
#include <stdio.h> | |
#include <sys/mount.h> | |
int main(int argc, char **argv) { | |
if (argc != 2) { | |
fprintf(stderr, "Dumb\n"); | |
return 1; | |
} | |
if (umount2(argv[1], MNT_FORCE) != 0) { | |
perror("umount"); | |
return 2; | |
} | |
return 0; | |
} | |
# grep Seccomp /proc/self/status | |
Seccomp: 2 | |
# ls | |
native.umount umount.c x64.umount | |
# ./x64.umount /proc/cpuinfo | |
umount: Permission denied | |
# ./native.umount /proc/cpuinfo | |
# | |
# init 0 | |
# # | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
x64.umount was compiled on the host (gcc --static), native.umount in the container