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

file: patch for CVE-2018-10360 #43856

Closed
wants to merge 1 commit into from
Closed

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jul 20, 2018

from Gentoo, based on upstream commit.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

from Gentoo, based on upstream commit.
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: file

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ms2zxhz3wl4l78wi7vlkgb6pyfcl3hq6-file-5.33
shrinking /nix/store/ms2zxhz3wl4l78wi7vlkgb6pyfcl3hq6-file-5.33/bin/file
shrinking /nix/store/ms2zxhz3wl4l78wi7vlkgb6pyfcl3hq6-file-5.33/lib/libmagic.so.1.0.0
gzipping man pages under /nix/store/ms2zxhz3wl4l78wi7vlkgb6pyfcl3hq6-file-5.33/share/man/
strip is /nix/store/90vmpr41dzsx350k5argycaf693hnl1l-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ms2zxhz3wl4l78wi7vlkgb6pyfcl3hq6-file-5.33/lib  /nix/store/ms2zxhz3wl4l78wi7vlkgb6pyfcl3hq6-file-5.33/bin
patching script interpreter paths in /nix/store/ms2zxhz3wl4l78wi7vlkgb6pyfcl3hq6-file-5.33
checking for references to /build in /nix/store/ms2zxhz3wl4l78wi7vlkgb6pyfcl3hq6-file-5.33...
/nix/store/ms2zxhz3wl4l78wi7vlkgb6pyfcl3hq6-file-5.33

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: file

Partial log (click to expand)

make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/private/tmp/nix-build-file-5.33.drv-0/file-5.33'
make[1]: Leaving directory '/private/tmp/nix-build-file-5.33.drv-0/file-5.33'
post-installation fixup
gzipping man pages under /nix/store/5mbanp7cl3f59vgrx7x65lamrad9sn7v-file-5.33/share/man/
strip is /nix/store/8axizw5mf6dx7wip65nbkyrmlkhmjhc5-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/5mbanp7cl3f59vgrx7x65lamrad9sn7v-file-5.33/lib  /nix/store/5mbanp7cl3f59vgrx7x65lamrad9sn7v-file-5.33/bin
patching script interpreter paths in /nix/store/5mbanp7cl3f59vgrx7x65lamrad9sn7v-file-5.33
/nix/store/5mbanp7cl3f59vgrx7x65lamrad9sn7v-file-5.33

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: file

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/3by4118h9jsxbyfkwzbaxk9g6hc771iw-file-5.33
shrinking /nix/store/3by4118h9jsxbyfkwzbaxk9g6hc771iw-file-5.33/bin/file
shrinking /nix/store/3by4118h9jsxbyfkwzbaxk9g6hc771iw-file-5.33/lib/libmagic.so.1.0.0
gzipping man pages under /nix/store/3by4118h9jsxbyfkwzbaxk9g6hc771iw-file-5.33/share/man/
strip is /nix/store/7iyn7gn33i7xxjgmwf25k20246y6nd9d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/3by4118h9jsxbyfkwzbaxk9g6hc771iw-file-5.33/lib  /nix/store/3by4118h9jsxbyfkwzbaxk9g6hc771iw-file-5.33/bin
patching script interpreter paths in /nix/store/3by4118h9jsxbyfkwzbaxk9g6hc771iw-file-5.33
checking for references to /build in /nix/store/3by4118h9jsxbyfkwzbaxk9g6hc771iw-file-5.33...
/nix/store/3by4118h9jsxbyfkwzbaxk9g6hc771iw-file-5.33

@FRidh
Copy link
Member

FRidh commented Jul 29, 2018

Should this be backported? Note the version in stable is 5.32.

@xeji
Copy link
Contributor

xeji commented Jul 31, 2018

14k rebuilds. Maybe this should go to staging?

@FRidh
Copy link
Member

FRidh commented Aug 1, 2018

yep, staging.

@xeji
Copy link
Contributor

xeji commented Aug 1, 2018

According to https://nvd.nist.gov/vuln/detail/CVE-2018-10360 only 5.33 is affected, no backport needed.

@vcunat
Copy link
Member

vcunat commented Aug 1, 2018

Perhaps staging-next directly, unless it's being merged before catching a rebuild. The change seems very unlikely to break anything.

I'm leaning to backport, actually. The patch applies well to the 18.03 version. I haven't studied the code, but the patched function hasn't changed recently at all...

@vcunat
Copy link
Member

vcunat commented Aug 1, 2018

Actually, why not update to 5.34 on master, instead of patching?

vcunat pushed a commit that referenced this pull request Aug 1, 2018
from Gentoo, based on upstream commit.

(cherry picked from commit 6546d17)
It seems not clear if _this_ version was affected by the CVE,
but the patch seems safe enough, so apply it to be sure.
@xeji xeji mentioned this pull request Aug 1, 2018
9 tasks
@xeji
Copy link
Contributor

xeji commented Aug 1, 2018

Opened #44295, which updates to 5.34 on staging.

@vcunat vcunat added the 8.has: port to stable A PR already has a backport to the stable release. label Aug 1, 2018
@vcunat
Copy link
Member

vcunat commented Aug 1, 2018

Backported. Ubuntu did the same for 5.32.

Let's do the update on master instead.

@vcunat vcunat closed this Aug 1, 2018
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

5 participants