Skip to content

nixos/wrappers: enforce target executable is ELF - #567913

Merged
LunNova merged 1 commit into
NixOS:staging-nixosfrom
GrimmTheShrimp:wrapper-elf
Sep 28, 2026
Merged

LunNova merged 1 commit into
NixOS:staging-nixosfrom
GrimmTheShrimp:wrapper-elf

Conversation

@GrimmTheShrimp

Copy link
Copy Markdown
Contributor

This will break some things, such as nixosTests.espanso. This is intended: Loading bash, python or perl scripts via SUID or extensive capabilities is dangerous. PERL5LIB, PYTHONPATH or BASH_ENV make these things trivial LPE primitives.

The mime types being matched include both static, non-static and pie ELFs. This should be fine until we somehow get yet another type of magic and associated mime type.

Things done

@GrimmTheShrimp GrimmTheShrimp added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Sep 28, 2026
@GrimmTheShrimp
GrimmTheShrimp changed the base branch from master to staging-nixos September 28, 2026 15:31
@nixpkgs-ci nixpkgs-ci Bot closed this Sep 28, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Sep 28, 2026
This *will* break some things, such as `nixosTests.espanso`.
This is intended: Loading bash, python or perl scripts via SUID or extensive capabilities is dangerous.
PERL5LIB, PYTHONPATH or BASH_ENV make these things trivial LPE primitives.

The mime types being matched include both static, non-static and pie ELFs.
This should be fine until we somehow get yet another type of magic and associated mime type.
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 7.no default reviewers This PR targets a package or module with no existing maintainers; roving reviewers, take pity! 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Sep 28, 2026
@LunNova
LunNova added this pull request to the merge queue Sep 28, 2026
@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Sep 28, 2026
Merged via the queue into NixOS:staging-nixos with commit 60cf12c Sep 28, 2026
35 checks passed
@Atemu

Atemu commented Sep 28, 2026

Copy link
Copy Markdown
Member

As a major breaking change, this needs a release note.

@nixos-discourse

Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/ensure-wrapper-integrity-failure-for-espanso/80586/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: security Issues which raise a security issue, or PRs that fix one 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 7.no default reviewers This PR targets a package or module with no existing maintainers; roving reviewers, take pity! 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-nixos-tests This PR causes rebuilds for all NixOS tests and should normally target the staging branches. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants