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

[20.09, staging] glibc: fix CVE-2020-6096 #104685

Merged
merged 1 commit into from Nov 29, 2020

Conversation

redvers
Copy link
Member

@redvers redvers commented Nov 23, 2020

Motivation for this change

Addresses: #93992 - CVE-2020-6092

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I do not own an arm7 system to test the build on - but my local x86_64 system continues to be happy.

@redvers redvers changed the base branch from release-20.09 to staging-20.09 November 23, 2020 16:44
@redvers redvers changed the title Update glibc 2.31 cve 2020 6096 glibc: patch - Fixes: CVE-2020-6096 Nov 23, 2020
Copy link
Member

@mweinelt mweinelt left a comment

Choose a reason for hiding this comment

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

The commit message needs some work, I'm sorry if I was not clear enough on what to put in.

I think something like this is more helpful:

glibc: fix CVE-2020-6096

Fixes a signed comparison vulnerability in the ARMv7 memcpy and memmove functions.

https://sourceware.org/bugzilla/show_bug.cgi?id=25620

Fixes: CVE-2020-6096

Attributes like Fixes, Reviewed-by, Tested-by et al. are usually put at the end of the commit message.

@redvers redvers changed the title glibc: patch - Fixes: CVE-2020-6096 glibc: Fixes: CVE-2020-6096 Nov 23, 2020
@redvers
Copy link
Member Author

redvers commented Nov 23, 2020

Got it - I'll get that commit message massaged - one moment caller...

@redvers
Copy link
Member Author

redvers commented Nov 23, 2020

@mweinelt - when you say "Reviewed-by:" and "Tested-by:" there's no entry for that in the commits for these two patches
(Although there is for the associated patch for the removal of the test).

I've included direct links to the patches.

@mweinelt
Copy link
Member

This also affects memmove. Check https://sourceware.org/bugzilla/show_bug.cgi?id=25620#c27.

@redvers
Copy link
Member Author

redvers commented Nov 23, 2020

Yup - that patch is included - but I'll update the commit message to include it.

@redvers redvers force-pushed the update_glibc_2.31_cve-2020-6096 branch from a43a054 to 67f254e Compare November 23, 2020 18:08
@mweinelt
Copy link
Member

Is this already mitigated in master? If yes, how and where? Why can't we backport that solution?

@ofborg ofborg bot requested a review from edolstra November 23, 2020 19:15
@mweinelt mweinelt changed the title glibc: Fixes: CVE-2020-6096 [staging] glibc: fix CVE-2020-6096 Nov 23, 2020
@andir
Copy link
Member

andir commented Nov 23, 2020

For what it's worth this looks fine. I've build the small release set of NixOS against this PR and only the scipy build fails (which is IIRC unrelated to this change): https://hydra.h4ck.space/build/338254#tabs-constituents

@redvers
Copy link
Member Author

redvers commented Nov 24, 2020

Is this already mitigated in master? If yes, how and where? Why can't we backport that solution?

Yes, it was mitigated by bumping to 2.32 which I did open as a cherry-picked PR upon which I received my first ever thumbs-down on a PR :-)

Apparently the bump to 2.32 has so many changes there's still stuff in master that is broken.

@vcunat
Copy link
Member

vcunat commented Nov 24, 2020

Oh, I see you decided for a single patch instead of the whole upstream 2.31 branch? I hope we won't be missing some important fix, but anyway... such changes can come later.

Detail: our aarch64 rebuild will take quite a long time, considering that the platform isn't said to be affected, but if you don't hurry, the non-conditional patching does appear cleanr.

@andir andir changed the title [staging] glibc: fix CVE-2020-6096 [20.09, staging] glibc: fix CVE-2020-6096 Nov 24, 2020
@redvers
Copy link
Member Author

redvers commented Nov 24, 2020

@vcunat - after discussions on #nixos-security we decided to pull the minimal changeset to address the security vulnerability.

There's so much domain knowledge required to make a judgement call as to which patches are fixes and which are 'fixes that will break things' that we took the safest path.

The provided patches only patch the arm arch specific files - the safest option. As you said, other potential patches are better left for later in the hands of someone better equipped to deal with that domain.

@vcunat
Copy link
Member

vcunat commented Nov 24, 2020

Sure, I never suggested going through all the patches. Take the whole branch as upstream picked which patches were considered suitable for the stable branch – or just take some specific ones like you decided to do.

@vcunat vcunat merged commit c0deed6 into NixOS:staging-20.09 Nov 29, 2020
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.

None yet

4 participants