Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cc-wrapper: add support for pacret hardening flag on aarch64 #324429

Merged
merged 2 commits into from
Jul 28, 2024

Conversation

risicle
Copy link
Contributor

@risicle risicle commented Jul 3, 2024

Description of changes

Rather than trying to shovel all these features under a single flag as in #320597, I'm now strongly leaning in the direction of exposing them separately (more on my reasoning @ https://discourse.nixos.org/t/future-design-of-hardening-flags/38826/6?u=ris)

One thing that stood out during the testing of #320597 was how few problems aarch64's pac-ret feature appeared to cause compared to x86's shadow-stacks. So this leading me to fast-tracking support for it.

The gotcha, again, is that I don't have access to one of these processors, so I'm going to need help testing this. Owners of ARM v8.3+ systems doing a bootstrap build of e.g. pkgsExtraHardening.hello on this branch would really be helping us out here. Example systems implementing ARM v8.3+ include AWS Graviton3 or Apple M1+ systems (running linux). The common Ampere Altra systems (including the Nix community builder and Hetzner) do not implement ARM v8.3.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@LeSuisse
Copy link
Contributor

I built up to pkgsExtraHardening.ffmpeg and all the deps of pkgsExtraHardening.firefox (I'm a bit short on RAM to fully build Firefox without it being too annoying) on a NixOS M1 Pro. I have not been able to identify an issue.

@risicle
Copy link
Contributor Author

risicle commented Jul 13, 2024

@ofborg eval

@github-actions github-actions bot added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label Jul 28, 2024
@emilazy
Copy link
Member

emilazy commented Jul 28, 2024

Will merge after rebase.

@emilazy emilazy merged commit 06a2219 into NixOS:staging Jul 28, 2024
9 of 10 checks passed
@emilazy
Copy link
Member

emilazy commented Jul 28, 2024

Thanks for all your work on package hardening. Hopefully we can flip more of this stuff on by default in the future.

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

Successfully merging this pull request may close these issues.

4 participants