Magisk/native/jni
topjohnwu 528601d25a Fix integer overflow and workaround seccomp
- Use ftruncate64 instead of ftruncate to workaround seccomp
- Cast uint32_t to off64_t before making it negative

Note: Using ftruncate with a modern NDK libc should actually be
fine as the syscall wrapper in bionic will use ftruncate64 internally.
However, since we are using the libc.a from r10e built for Gingerbread,
seccomp wasn't a thing back then, and also the ftruncate64 symbol is
missing; we have to create our own wrapper and call it instead on
32-bit ABIs.

Props to @jnotuo for discovering the overflow bug and seccomp issue

Fix #3703, close #4915
2021-11-10 03:07:20 -08:00
..
core Replace module fd with memfd if possible 2021-10-28 00:26:18 -07:00
external Update libcxx 2021-10-21 02:08:13 -07:00
include Make zygisk survive zygote restarts 2021-10-27 01:53:16 -07:00
init Fix #4853 2021-11-02 19:31:17 -07:00
magiskboot Fix integer overflow and workaround seccomp 2021-11-10 03:07:20 -08:00
magiskpolicy Update rules again 2021-10-29 03:37:14 -07:00
resetprop Prune unused nodes from trie 2021-10-09 02:15:03 -07:00
su realpath /proc/pid/cwd 2021-10-29 03:13:20 -07:00
utils Fix integer overflow and workaround seccomp 2021-11-10 03:07:20 -08:00
zygisk Always unload zygisk after specialize 2021-11-07 13:05:44 -08:00
.gitignore Add entrypoint to build test 2019-04-01 02:46:09 -04:00
Android.mk Make zygisk survive zygote restarts 2021-10-27 01:53:16 -07:00
Application.mk Build on API 21 headers 2021-10-20 03:17:42 -07:00