Vulnerability in ld.so OpenBSD

Dynamic loader ld.so, which is part of OpenBSD, under certain conditions may for SUID/SGID-applications leave the environment variable LD_LIBRARY_PATH and thereby allow loading third-party code in the context of a process running with elevated privileges. Patches fixing the vulnerability are available for releases 6.5 i 6.6. Binary patches (syspatch) for amd64, i386, and arm64 platforms have already been put into production and should be available for download by the time this news is published.

The essence of the problem: during operation, ld.so first extracts the value of the LD_LIBRARY_PATH variable from the environment, using the _dl_split_path() function turns it into an array of strings — paths to directories. If it later turns out that the current process is running a SUID/SGID application, then the created array and, in fact, the LD_LIBRARY_PATH variable are cleared. At the same time, if during the operation of _dl_split_path() it encounters a memory shortage (which is difficult due to an explicit limit on the size of environment variables of 256 kilobytes, but theoretically possible), then the _dl_libpath variable will receive a value of NULL, and the subsequent check of this variable’s value will cause the call _dl_unsetenv("LD_LIBRARY_PATH") to be skipped.

The vulnerability was found by specialists Qualys, as well as several previously disclosed issues. The security researchers who discovered the vulnerability noted the promptness of the solution: the patch was prepared, and updates were released within three hours after notification by the OpenBSD project.

Addition: The issue has been assigned the number CVE-2019-19726. An official announcementwas made in the oss-security mailing list, including a prototype exploit that works in OpenBSD 6.6, 6.5, 6.2, and 6.1 on the architectures
amd64 and i386 (the exploit can be adapted for other architectures).
The issue is exploitable in the default installation and allows an unprivileged local user to execute code with root rights through library substitution when launching SUID utilities chpass or passwd. To create the required exploitation conditions, a memory shortage is utilized by setting the RLIMIT_DATA limit via setrlimit.

Izvor: opennet.ru

Kupite pouzdan hosting za sajtove uz zaštitu od DDoS, VPS VDS servere 🔥 Kupite pouzdan hosting za sajtove uz zaštitu od DDoS, VPS VDS servere | ProHoster