From 3604e3ae9d333cd7d468a8be4b277adfd9427f1b Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 30 Dec 2025 15:45:33 +0100 Subject: [PATCH] nixos/doc/release-notes: document glibc execstack change --- .../manual/release-notes/rl-2605.section.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2605.section.md b/nixos/doc/manual/release-notes/rl-2605.section.md index 9d4f926dc718..d382e528525e 100644 --- a/nixos/doc/manual/release-notes/rl-2605.section.md +++ b/nixos/doc/manual/release-notes/rl-2605.section.md @@ -90,3 +90,41 @@ of pulling the upstream container image from Docker Hub. If you want the old beh - `services.openssh` now supports generating host SSH keys by setting `services.openssh.generateHostKeys = true` while leaving `services.openssh.enable` disabled. This is particularly useful for systems that have no need of an SSH daemon but want SSH host keys for other purposes such as using agenix or sops-nix. - `services.slurm` now supports slurmrestd usage through the `services.slurm.rest` NixOS options. + +- `glibc` has been updated to version 2.42. + + This version no longer makes the stack executable when a shared library requires this. A symptom + is an error like + + > cannot enable executable stack as shared object requires: Invalid argument + + This is usually a bug. Please consider reporting it to the software maintainers. + + In a lot of cases, the library requires the execstack by mistake only. The following workarounds exist: + + * When building the shared library in question from source, use the following linker flags to force turning off the + executable flag: + + ```nix + mkDerivation { + # … + + env.NIX_LDFLAGS = "-z,noexecstack"; + } + ``` + + * If the sources are not available, the execstack-flag can be cleared with `patchelf`: + + ``` + patchelf --clear-execstack binary-only.so + ``` + + * If the shared library to be loaded actually requires an executable stack and it isn't turned + on by the application loading it, you may force allowing that behavior by setting the + following environment variable: + + ``` + GLIBC_TUNABLES=glibc.rtld.execstack=2 + ``` + + **Do not set this globally!** This makes your setup inherently less secure.