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

mupdf: apply patch for CVE-2018-6544 #35414

Merged
merged 1 commit into from Feb 23, 2018
Merged

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Feb 23, 2018

Motivation for this change

This applies a patch for CVE-2018-6544:

pdf_load_obj_stm in pdf/pdf-xref.c in Artifex MuPDF 1.12.0 could reference the object stream recursively and therefore run out of error stack, which allows remote attackers to cause a denial of service via a crafted PDF document.

see #35408

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

@joachifm
Copy link
Contributor

@GrahamcOfBorg build mpdf jfbview

@flokli
Copy link
Contributor Author

flokli commented Feb 23, 2018

I'm not really sure why mupdf-1.11 from nixos-17.09 shouldn't be affected as well.
Will backport the bump and this patch and file a separate PR for it.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

�[31;1merror:�[0m attribute 'mpdf' in selection path 'mpdf' not found

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

error: attribute 'mpdf' in selection path 'mpdf' not found

@joachifm
Copy link
Contributor

@GrahamcOfBorg build mupdf

@joachifm joachifm added the 9.needs: port to stable A PR needs a backport to the stable release. label Feb 23, 2018
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/m48zfdk1n7g679mdyy8ck4j44w85nn60-mupdf-1.12.0-man
gzipping man pages under /nix/store/m48zfdk1n7g679mdyy8ck4j44w85nn60-mupdf-1.12.0-man/share/man/
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/m48zfdk1n7g679mdyy8ck4j44w85nn60-mupdf-1.12.0-man
checking for references to /build in /nix/store/m48zfdk1n7g679mdyy8ck4j44w85nn60-mupdf-1.12.0-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/39a3wm825wrvik5x5wxdmdqfcyvh71qc-mupdf-1.12.0-doc
strip is /nix/store/lvx1acn1ig1j2km8jds5x3ggh3f2wa8v-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/39a3wm825wrvik5x5wxdmdqfcyvh71qc-mupdf-1.12.0-doc
checking for references to /build in /nix/store/39a3wm825wrvik5x5wxdmdqfcyvh71qc-mupdf-1.12.0-doc...
/nix/store/0mpb2njsgk26ylwj9wgz48jqlrn9ylv2-mupdf-1.12.0-bin

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Partial log (click to expand)

patching script interpreter paths in /nix/store/5iavrh01ff6n627pc248zvc3wn9hlh9r-mupdf-1.12.0-dev
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/j2q0sjridrks9zm676gnr8fan8m0vfdq-mupdf-1.12.0/lib
patching script interpreter paths in /nix/store/j2q0sjridrks9zm676gnr8fan8m0vfdq-mupdf-1.12.0
gzipping man pages under /nix/store/vprjza277rswm0b20l22yiqvmyi1fyis-mupdf-1.12.0-man/share/man/
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/vprjza277rswm0b20l22yiqvmyi1fyis-mupdf-1.12.0-man
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/rhyy1f7s9j5a37lx7a8xvmkx33mzzh1q-mupdf-1.12.0-doc
/nix/store/r629k3d482l4j6kik6xqam42krw6s875-mupdf-1.12.0-bin

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

error: attribute ‘mpdf’ in selection path ‘mpdf’ not found

@joachifm joachifm merged commit cda0f9f into NixOS:master Feb 23, 2018
@flokli
Copy link
Contributor Author

flokli commented Feb 23, 2018

Thanks!

@flokli flokli deleted the CVE-2018-6544 branch February 23, 2018 19:15
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/vn1d7flvd4n6n018f0xfzj4q5lm22f41-mupdf-1.12.0-man
gzipping man pages under /nix/store/vn1d7flvd4n6n018f0xfzj4q5lm22f41-mupdf-1.12.0-man/share/man/
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/vn1d7flvd4n6n018f0xfzj4q5lm22f41-mupdf-1.12.0-man
checking for references to /tmp/nix-build-mupdf-1.12.0.drv-0 in /nix/store/vn1d7flvd4n6n018f0xfzj4q5lm22f41-mupdf-1.12.0-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/vn2wsfl0pszl0zbl0y507avb8f0kngc3-mupdf-1.12.0-doc
strip is /nix/store/b0zlxla7dmy1iwc3g459rjznx59797xy-binutils-2.28.1/bin/strip
patching script interpreter paths in /nix/store/vn2wsfl0pszl0zbl0y507avb8f0kngc3-mupdf-1.12.0-doc
checking for references to /tmp/nix-build-mupdf-1.12.0.drv-0 in /nix/store/vn2wsfl0pszl0zbl0y507avb8f0kngc3-mupdf-1.12.0-doc...
/nix/store/7sd1di95qckvjfnhb2g85bzxank54000-mupdf-1.12.0-bin

@samueldr samueldr removed the 9.needs: port to stable A PR needs a backport to the stable release. label Apr 17, 2019
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