#dlopen

2025-04-25

glibc (2.41-7) unstable; urgency=medium

Starting with glibc 2.41, shared libraries requiring an executable stack
cannot be dynamically loaded through the #dlopen mechanism from a binary that
does not require an executable stack. This change aims to improve security,
as the previous behavior was used as a vector for RCE (#CVE-2023-38408).
Attempting to do so will result in the following error:

cannot enable executable stack as shared object requires: Invalid argument

While most libraries generated in the past 20 years do not require an
executable stack, some third-party software still need this capability. Many
vendors have already updated their binaries to address this.

If you need to run a program that requires an executable stack through
dynamic loaded shared libraries, you can use the glibc.rtld.execstack
tunable:

Glibc6_TUNABLES=glibc.rtld.execstack=2 ./program

-- Aurelien Jarno <aurel32@debian.org> Sun, 13 Apr 2025 14:41:11 +0200

#Debian #Changelog #GLibC #Security #Linux

2024-11-05

Грязные трюки C++ из userver и Boost

Привет, я Антон Полухин из Техплатформы Екома и Райдтеха Яндекса. Моя команда разрабатывает userver — современный опенсорсный асинхронный фреймворк с богатым набором абстракций для быстрого и комфортного создания микросервисов, сервисов и утилит на C++. Когда мы пишем какой‑то код для userver и для таких сложных проектов, как Boost , периодически мы сталкиваемся с нестандартными проблемами. И эти нестандартные проблемы требуют нестандартных решений. Вот о таких решениях мы сегодня и поговорим. А именно: — Посмотрим, как работают исключения на платформе Linux x86, и сделаем с ними что‑то интересное. — Залезем ещё глубже под капот исключений и сделаем их ещё быстрее. — Сделаем висячую ссылку на невалидный объект, и всё будет хорошо. — А под конец то, что все любим, — погрузимся в шаблонное метапрограммирование.

habr.com/ru/companies/yandex/a

#stacktrace #exception #exceptions #exception_throw_refactoring #metaprogramming #boost #userver #dlopen #throw #throwcatch

2023-04-01

New Video about Dynamic Loading (31min)

Video: youtu.be/VO6gMLtQOKM

Code: github.com/simonracz/dynamic-l

This is mostly for C and C++ devs, although I briefly mention other languages as well.

It's about the dlopen(), dlsym().. APIs and their many use cases.

#linux #C #C++ #dlopen #linker #dynamic #loading #java #android #live #streaming

Kushal Das :python: :tor:kushal@toots.dgplug.org
2022-11-28

I am trying to figure out why can one update a .dylib file to a #symlink of a locally built file in a #MacOS #App and there is no error related to #signature check on #Apple #MacOS while running..

In this case the culprit #application is #Thunderbird and most probably is doing #dlopen of that changed dylib.

I thought #GateKeeper will stop this. #security #verification

Mark Kittisopikulmarkkitti@fosstodon.org
2022-11-23

The difference is due to the behavior of #dlopen when given a null pointer for the first argument.

Linux: "If filename is NULL, then the returned handle is for the main program."

man7.org/linux/man-pages/man3/

Mark Kittisopikulmarkkitti@fosstodon.org
2022-11-23

I've been looking at the behavior of #dlopen on #Linux and #macOS in relation to `ctypes.pythonapi._handle`.

On Linux, this returns a specific handle to look up symbols in the Python executable via `dlsym` even when statically linked to libpython.

On macOS, this returns RTLD_DEFAULT, which can be a bit slow since this searches all mach-o images.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst