mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-12 12:50:51 +00:00
- Fixes https://github.com/termux/termux-packages/issues/27344
- 32-bit Android has `#define pw_gecos pw_passwd` in `struct passwd`
- therefore `free(pw->pw_passwd)` followed by `free(pw->pw_gecos)` in OpenSSH is a double-free undefined behavior when run on 32-bit Android
- because `openssh` Autotools build system detects the `#define pw_gecos pw_passwd` as implicit support for `pw_gecos` that does not exist in 32-bit Android
- and this undefined behavior happens to result in no crash on 32-bit Android 10 and older, but a crash `SIGABRT` on 32-bit Android 11 and newer because Android 11+ have a different memory allocator from older Android (Scudo)
- https://source.android.com/docs/security/test/scudo
- 47828dbd95/misc.c (L563)
- https://cs.android.com/android/platform/superproject/+/android-16.0.0_r4:bionic/libc/include/pwd.h;l=77