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

Update nix dependency to address CVE-2021-45707 #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

grahambrereton-form3
Copy link

Updating nix to latest required updating rustc. This prompted a change to use stable instead of the old nightly channel build from 2021.

I think the switch from nightly is justified:

  • Full relro is the default behaviour on Linux and x64, which is the only possible current target for this repo as far as I can tell, so the experimental build flag is not required.
  • Vec::into_raw_parts is experimental, but not necessary and you can work around its absence.
  • LinkedList::drain_filter is not necessary, given there doesn't appear to be any benefit to using a linked list in this case. A simple Vec suffices for the stack-like usage, and it provides retain to remove all non-matching items.

File built on stable with no -Z relro-level=full option:

❯ checksec --file=./toda 
RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH	Symbols		FORTIFY	Fortified	Fortifiable  FILE
Full RELRO      No canary found   NX enabled    PIE enabled     No RPATH   No RUNPATH   19690 Symbols     No	0		10	./toda

Full relro is the default behaviour on Linux and x64, so the
experimental build flag is not required.

Work around lack of `Vec::into_raw_parts`.

Use a standard `Vec` for node paths. It should provide the same
performance or better than using a `LinkedList`, and it has `retain`
defined which facilitates the `remove` functionality.

Signed-off-by: Graham Brereton <graham.brereton@form3.tech>
Addresses CVE-2021-45707

Signed-off-by: Graham Brereton <graham.brereton@form3.tech>
Signed-off-by: Graham Brereton <graham.brereton@form3.tech>
@chaotic-prow
Copy link

chaotic-prow bot commented Oct 26, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

Successfully merging this pull request may close these issues.

1 participant