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

dhcpcd: enable sandboxing options #208780

Merged
merged 1 commit into from
Oct 8, 2024
Merged

Conversation

Izorkin
Copy link
Contributor

@Izorkin Izorkin commented Jan 2, 2023

Description of changes

Enable sandboxing options.
Result:

systemd-analyze security dhcpcd
...
→ Overall exposure level for dhcpcd.service: 2.9 OK 🙂

cc @SuperSandro2000

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.11 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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

fpletz
fpletz previously requested changes Jan 6, 2023
Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might break the setup of people using networking.dhcpcd.runHook. I don't think we should go ahead with this without at least an entry in the release notes and an option to disable hardening.

@Izorkin
Copy link
Contributor Author

Izorkin commented Jan 6, 2023

This might break the setup of people using networking.dhcpcd.runHook. I don't think we should go ahead with this without at least an entry in the release notes and an option to disable hardening.

Updated PR.
Now when using networking.dhcpcd.runHook these settings are not applied.
Added relese-notes.

@Izorkin
Copy link
Contributor Author

Izorkin commented Jan 23, 2023

Resolving conflicts.

@Izorkin
Copy link
Contributor Author

Izorkin commented Feb 9, 2023

Rebased PR.

@Izorkin
Copy link
Contributor Author

Izorkin commented Feb 11, 2023

Resolved conflicts.

@Izorkin
Copy link
Contributor Author

Izorkin commented Nov 15, 2023

Small update and rebase PR.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test this on my machine but if the author tested it fine for me

@Izorkin Izorkin requested review from SuperSandro2000, fpletz and blitz and removed request for blitz and fpletz February 16, 2024 07:19
@SuperSandro2000
Copy link
Member

I am no longer using dhcpcd

@Izorkin
Copy link
Contributor Author

Izorkin commented Oct 6, 2024

Rebased PR.
What is needed to get this PR merged?

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/prs-already-reviewed/2617/2020

@Izorkin Izorkin requested review from mweinelt and Ma27 October 8, 2024 05:05
@flokli
Copy link
Contributor

flokli commented Oct 8, 2024

From #208780 (review), slightly highlighted:

This might break the setup of people using networking.dhcpcd.runHook. I don't think we should go ahead with this without at least an entry in the release notes and an option to disable hardening.

This is still missing said option, as well as a mention of it in the release notes.

@Izorkin
Copy link
Contributor Author

Izorkin commented Oct 8, 2024

This is still missing said option, as well as a mention of it in the release notes.

Doesn't this line disable sandbox mode?

          } // lib.optionalAttrs (cfg.runHook == "") {

@flokli
Copy link
Contributor

flokli commented Oct 8, 2024

Ah, now I understand, you don't apply sandboxing at all if there's a hook present.

@flokli
Copy link
Contributor

flokli commented Oct 8, 2024

I still hope we can get rid of scripted networking altogether, but today is not that day, so sure, let's add the sandboxing. Thanks for the PR!

@flokli flokli merged commit 146e83d into NixOS:master Oct 8, 2024
27 checks passed
@Izorkin Izorkin deleted the update-dhcpcd-hardening branch October 8, 2024 10:09
@Izorkin
Copy link
Contributor Author

Izorkin commented Oct 8, 2024

Thanks!

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.

8 participants