Hardcode the path to libbinder_ndk.so to /system/lib64/ or /system/lib/ to prevent loading malicious libraries from unauthorized directories.
Signed-off-by: 0xBat <[email protected]> --- compat/android/binder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compat/android/binder.c b/compat/android/binder.c index a214d977cc..58c0c3859e 100644 --- a/compat/android/binder.c +++ b/compat/android/binder.c @@ -41,7 +41,9 @@ static void *dlopen_libbinder_ndk(void) * See also: https://source.android.com/docs/core/architecture/aidl/aidl-backends */ - void *h = dlopen("libbinder_ndk.so", RTLD_NOW | RTLD_LOCAL); + void *h = dlopen("/system/lib64/libbinder_ndk.so", RTLD_NOW | RTLD_LOCAL); + if (!h) + h = dlopen("/system/lib/libbinder_ndk.so", RTLD_NOW | RTLD_LOCAL); if (h != NULL) return h; -- 2.52.0.windows.1 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
