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

[18.03] thunderbird: 52.9.0 -> 60, thunderbird-bin: 52.9.0 -> 60 #47761

Merged
merged 3 commits into from Oct 4, 2018

Conversation

andir
Copy link
Member

@andir andir commented Oct 3, 2018

Motivation for this change

This is a port of the current state of thunderbird from the master
branch. We did miss a bunch of security fixes when thunderbird 60 was
released. This is an attempt to take a shortcut by simply copying over
the expression from the master branch.

Security related fixes in this release are:

  • CVE-2018-12359: Buffer overflow using computed size of canvas element
    A buffer overflow can occur when rendering canvas content while
    adjusting the height and width of the element dynamically,
    causing data to be written outside of the currently computed
    boundaries. This results in a potentially exploitable crash.

  • CVE-2018-12360: Use-after-free when using focus()
    A use-after-free vulnerability can occur when deleting an input
    element during a mutation event handler triggered by focusing that
    element. This results in a potentially exploitable crash.

  • CVE-2018-12361: Integer overflow in SwizzleData
    An integer overflow can occur in the SwizzleData code while
    calculating buffer sizes. The overflowed value is used for subsequent
    graphics computations when their inputs are not sanitized which
    results in a potentially exploitable crash.

  • CVE-2018-12362: Integer overflow in SSSE3 scaler
    An integer overflow can occur during graphics operations done by the
    Supplemental Streaming SIMD Extensions 3 (SSSE3) scaler, resulting in
    a potentially exploitable crash.

  • CVE-2018-5156: Media recorder segmentation fault when track type is changed during capture
    A vulnerability can occur when capturing a media stream when the media
    source type is changed as the capture is occuring. This can result in
    stream data being cast to the wrong type causing a potentially
    exploitable crash.

  • CVE-2018-12363: Use-after-free when appending DOM nodes
    A use-after-free vulnerability can occur when script uses mutation
    events to move DOM nodes between documents, resulting in the old
    document that held the node being freed but the node still having a
    pointer referencing it. This results in a potentially exploitable
    crash.

  • CVE-2018-12364: CSRF attacks through 307 redirects and NPAPI plugins
    NPAPI plugins, such as Adobe Flash, can send non-simple cross-origin
    requests, bypassing CORS by making a same-origin POST that does a 307
    redirect to the target site. This allows for a malicious site to
    engage in cross-site request forgery (CSRF) attacks.

  • CVE-2018-12365: Compromised IPC child process can list local filenames
    A compromised IPC child process can escape the content sandbox and
    list the names of arbitrary files on the file system without user
    consent or interaction. This could result in exposure of private local
    files.

  • CVE-2018-12371: Integer overflow in Skia library during edge builder allocation
    An integer overflow vulnerability in the Skia library when allocating
    memory for edge builders on some systems with at least 16 GB of RAM.
    This results in the use of uninitialized memory, resulting in a
    potentially exploitable crash.

  • CVE-2018-12366: Invalid data handling during QCMS transformations
    An invalid grid size during QCMS (color profile) transformations can
    result in the out-of-bounds read interpreted as a float value. This
    could leak private data into the output.

  • CVE-2018-12367: Timing attack mitigation of PerformanceNavigationTiming
    In the previous mitigations for Spectre, the resolution or precision
    of various methods was reduced to counteract the ability to measure
    precise time intervals. In that work, PerformanceNavigationTiming was
    not adjusted but it was found that it could be used as a precision
    timer.

  • CVE-2018-5187: Memory safety bugs fixed in Firefox 61, Firefox ESR 60.1, and Thunderbird 60
    Mozilla developers and community members Christian Holler, Sebastian
    Hengst, Nils Ohlmeier, Jon Coppeard, Randell Jesup, Ted Campbell, Gary
    Kwong, and Jean-Yves Avenard reported memory safety bugs present in
    Firefox 60 and Firefox ESR 60. Some of these bugs showed evidence of
    memory corruption and we presume that with enough effort that some of
    these could be exploited to run arbitrary code.

  • CVE-2018-5188: Memory safety bugs fixed in Firefox 61, Firefox ESR 60.1, Firefox ESR 52.9, and Thunderbird 60
    Mozilla developers and community members Alex Gaynor, Christoph Diehl,
    Christian Holler, Jason Kratzer, David Major, Jon Coppeard, Nicolas B.
    Pierron, Jason Kratzer, Marcia Knous, and Ronald Crane reported memory
    safety bugs present in Firefox 60, Firefox ESR 60, and Firefox ESR
    52.8. Some of these bugs showed evidence of memory corruption and we
    presume that with enough effort that some of these could be exploited
    to run arbitrary code.

/cc @taku0

Things done
  • 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.

taku0 and others added 3 commits October 3, 2018 15:16
(cherry picked from commit d4de3b2)
This is a port of the current state of thunderbird from the master
branch. We did miss a bunch of security fixes when thunderbird 60 was
released. This is an attempt to take a shortcut by simply copying over
the expression from the master branch.

Security related fixes in this release are:

- CVE-2018-12359: Buffer overflow using computed size of canvas element
  A buffer overflow can occur when rendering canvas content while
  adjusting the height and width of the <canvas> element dynamically,
  causing data to be written outside of the currently computed
  boundaries.  This results in a potentially exploitable crash.

- CVE-2018-12360: Use-after-free when using focus()
  A use-after-free vulnerability can occur when deleting an input
  element during a mutation event handler triggered by focusing that
  element. This results in a potentially exploitable crash.

- CVE-2018-12361: Integer overflow in SwizzleData
  An integer overflow can occur in the SwizzleData code while
  calculating buffer sizes. The overflowed value is used for subsequent
  graphics computations when their inputs are not sanitized which
  results in a potentially exploitable crash.

- CVE-2018-12362: Integer overflow in SSSE3 scaler
  An integer overflow can occur during graphics operations done by the
  Supplemental Streaming SIMD Extensions 3 (SSSE3) scaler, resulting in
  a potentially exploitable crash.

- CVE-2018-5156: Media recorder segmentation fault when track type is changed during capture
  A vulnerability can occur when capturing a media stream when the media
  source type is changed as the capture is occuring. This can result in
  stream data being cast to the wrong type causing a potentially
  exploitable crash.

- CVE-2018-12363: Use-after-free when appending DOM nodes
  A use-after-free vulnerability can occur when script uses mutation
  events to move DOM nodes between documents, resulting in the old
  document that held the node being freed but the node still having a
  pointer referencing it. This results in a potentially exploitable
  crash.

- CVE-2018-12364: CSRF attacks through 307 redirects and NPAPI plugins
  NPAPI plugins, such as Adobe Flash, can send non-simple cross-origin
  requests, bypassing CORS by making a same-origin POST that does a 307
  redirect to the target site. This allows for a malicious site to
  engage in cross-site request forgery (CSRF) attacks.

- CVE-2018-12365: Compromised IPC child process can list local filenames
  A compromised IPC child process can escape the content sandbox and
  list the names of arbitrary files on the file system without user
  consent or interaction. This could result in exposure of private local
  files.

- CVE-2018-12371: Integer overflow in Skia library during edge builder allocation
  An integer overflow vulnerability in the Skia library when allocating
  memory for edge builders on some systems with at least 16 GB of RAM.
  This results in the use of uninitialized memory, resulting in a
  potentially exploitable crash.

- CVE-2018-12366: Invalid data handling during QCMS transformations
  An invalid grid size during QCMS (color profile) transformations can
  result in the out-of-bounds read interpreted as a float value. This
  could leak private data into the output.

- CVE-2018-12367: Timing attack mitigation of PerformanceNavigationTiming
  In the previous mitigations for Spectre, the resolution or precision
  of various methods was reduced to counteract the ability to measure
  precise time intervals. In that work, PerformanceNavigationTiming was
  not adjusted but it was found that it could be used as a precision
  timer.

- CVE-2018-5187: Memory safety bugs fixed in Firefox 61, Firefox ESR 60.1, and Thunderbird 60
  Mozilla developers and community members Christian Holler, Sebastian
  Hengst, Nils Ohlmeier, Jon Coppeard, Randell Jesup, Ted Campbell, Gary
  Kwong, and Jean-Yves Avenard reported memory safety bugs present in
  Firefox 60 and Firefox ESR 60. Some of these bugs showed evidence of
  memory corruption and we presume that with enough effort that some of
  these could be exploited to run arbitrary code.

- CVE-2018-5188: Memory safety bugs fixed in Firefox 61, Firefox ESR 60.1, Firefox ESR 52.9, and Thunderbird 60
  Mozilla developers and community members Alex Gaynor, Christoph Diehl,
  Christian Holler, Jason Kratzer, David Major, Jon Coppeard, Nicolas B.
  Pierron, Jason Kratzer, Marcia Knous, and Ronald Crane reported memory
  safety bugs present in Firefox 60, Firefox ESR 60, and Firefox ESR
  52.8. Some of these bugs showed evidence of memory corruption and we
  presume that with enough effort that some of these could be exploited
  to run arbitrary code.
@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: thunderbird, thunderbird-bin

Partial log (click to expand)

  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.


Cannot nix-instantiate `thunderbird-bin' because:
error: while evaluating 'callPackageWith' at /private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix:113:35, called from /private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/top-level/all-packages.nix:17885:21:
while evaluating 'makeOverridable' at /private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix:72:24, called from /private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix:117:8:
while evaluating anonymous function at /private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix:1:1, called from /private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/lib/customisation.nix:74:12:
assertion failed at /private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/applications/networking/mailreaders/thunderbird-bin/default.nix:46:1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: thunderbird

The following builds were skipped because they don't evaluate on aarch64-linux: thunderbird-bin

Partial log (click to expand)

shrinking /nix/store/yvfpa2xdizpkny6nq9kwyqa1mgy9lr9b-thunderbird-60.2.1/lib/thunderbird/libldif60.so
shrinking /nix/store/yvfpa2xdizpkny6nq9kwyqa1mgy9lr9b-thunderbird-60.2.1/lib/thunderbird/libprldap60.so
shrinking /nix/store/yvfpa2xdizpkny6nq9kwyqa1mgy9lr9b-thunderbird-60.2.1/lib/thunderbird/pingsender
strip is /nix/store/hy39vplmzpwckvzxgyhr54dwz0mnfv2p-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/yvfpa2xdizpkny6nq9kwyqa1mgy9lr9b-thunderbird-60.2.1/lib  /nix/store/yvfpa2xdizpkny6nq9kwyqa1mgy9lr9b-thunderbird-60.2.1/bin
patching script interpreter paths in /nix/store/yvfpa2xdizpkny6nq9kwyqa1mgy9lr9b-thunderbird-60.2.1
checking for references to /build in /nix/store/yvfpa2xdizpkny6nq9kwyqa1mgy9lr9b-thunderbird-60.2.1...
running install tests
 Thunderbird 60.2.1
/nix/store/yvfpa2xdizpkny6nq9kwyqa1mgy9lr9b-thunderbird-60.2.1

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: thunderbird

The following builds were skipped because they don't evaluate on x86_64-linux: thunderbird-bin

Partial log (click to expand)

rm -f libdom_workers.a
/build/objdir/_virtualenv/bin/python /build/thunderbird-60.2.1/config/expandlibs_gen.py -o libdom_workers.a.desc Unified_cpp_dom_workers0.o Unified_cpp_dom_workers1.o
make[3]: Leaving directory '/build/objdir/dom/workers'
make[3]: Entering directory '/build/objdir/dom/xbl'
mkdir -p '.deps/'
/nix/store/9y2f87qb1djmpjs1gxl6smfkpl581waa-gcc-wrapper-7.3.0/bin/g++ -o Unified_cpp_dom_xbl0.o -c -I/build/objdir/dist/stl_wrappers -I/build/objdir/dist/system_wrappers -include /build/thunderbird-60.2.1/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/build/thunderbird-60.2.1/dom/xbl -I/build/objdir/dom/xbl -I/build/thunderbird-60.2.1/dom/base -I/build/thunderbird-60.2.1/dom/html -I/build/thunderbird-60.2.1/dom/xml -I/build/thunderbird-60.2.1/dom/xul -I/build/thunderbird-60.2.1/layout/style -I/build/objdir/dist/include -I/nix/store/zam1virs532gjsychlin4gq58w4h2pgn-nspr-4.19-dev/include -I/nix/store/g9dps4vzjb0nwa7yq2xxganxlpliz434-nss-3.38-dev/include/nss -I/nix/store/fd63gix8rs8jyaxzb79bycy2b892q8rv-pixman-0.34.0/include/pixman-1 -fPIC -DMOZILLA_CLIENT -include /build/objdir/mozilla-config.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++1z-compat -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-security -Wformat-overflow=2 -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -I/nix/store/3andck6v2a9yzi133fpr8qq54b5p5i5s-icu4c-59.1-dev/include -freorder-blocks -O2 -fomit-frame-pointer -Wno-error=shadow  -MD -MP -MF .deps/Unified_cpp_dom_xbl0.o.pp   /build/objdir/dom/xbl/Unified_cpp_dom_xbl0.cpp
/nix/store/9y2f87qb1djmpjs1gxl6smfkpl581waa-gcc-wrapper-7.3.0/bin/g++ -o Unified_cpp_dom_smil1.o -c -I/build/objdir/dist/stl_wrappers -I/build/objdir/dist/system_wrappers -include /build/thunderbird-60.2.1/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/build/thunderbird-60.2.1/dom/smil -I/build/objdir/dom/smil -I/build/thunderbird-60.2.1/dom/base -I/build/thunderbird-60.2.1/dom/svg -I/build/thunderbird-60.2.1/layout/base -I/build/thunderbird-60.2.1/layout/style -I/build/objdir/dist/include -I/nix/store/zam1virs532gjsychlin4gq58w4h2pgn-nspr-4.19-dev/include -I/nix/store/g9dps4vzjb0nwa7yq2xxganxlpliz434-nss-3.38-dev/include/nss -I/nix/store/fd63gix8rs8jyaxzb79bycy2b892q8rv-pixman-0.34.0/include/pixman-1 -fPIC -DMOZILLA_CLIENT -include /build/objdir/mozilla-config.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++1z-compat -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-security -Wformat-overflow=2 -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -I/nix/store/3andck6v2a9yzi133fpr8qq54b5p5i5s-icu4c-59.1-dev/include -freorder-blocks -O2 -fomit-frame-pointer  -MD -MP -MF .deps/Unified_cpp_dom_smil1.o.pp   /build/objdir/dom/smil/Unified_cpp_dom_smil1.cpp
/nix/store/9y2f87qb1djmpjs1gxl6smfkpl581waa-gcc-wrapper-7.3.0/bin/g++ -o Unified_cpp_dom_indexedDB1.o -c -I/build/objdir/dist/stl_wrappers -I/build/objdir/dist/system_wrappers -include /build/thunderbird-60.2.1/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/build/thunderbird-60.2.1/dom/indexedDB -I/build/objdir/dom/indexedDB -I/build/objdir/ipc/ipdl/_ipdlheaders -I/build/thunderbird-60.2.1/ipc/chromium/src -I/build/thunderbird-60.2.1/ipc/glue -I/build/thunderbird-60.2.1/db/sqlite3/src -I/build/thunderbird-60.2.1/dom/base -I/build/thunderbird-60.2.1/dom/storage -I/build/thunderbird-60.2.1/ipc/glue -I/build/thunderbird-60.2.1/xpcom/build -I/build/thunderbird-60.2.1/xpcom/threads -I/build/objdir/dist/include -I/nix/store/zam1virs532gjsychlin4gq58w4h2pgn-nspr-4.19-dev/include -I/nix/store/g9dps4vzjb0nwa7yq2xxganxlpliz434-nss-3.38-dev/include/nss -I/nix/store/fd63gix8rs8jyaxzb79bycy2b892q8rv-pixman-0.34.0/include/pixman-1 -fPIC -DMOZILLA_CLIENT -include /build/objdir/mozilla-config.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++1z-compat -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-security -Wformat-overflow=2 -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -I/nix/store/3andck6v2a9yzi133fpr8qq54b5p5i5s-icu4c-59.1-dev/include -freorder-blocks -O2 -fomit-frame-pointer -Wno-error=shadow  -MD -MP -MF .deps/Unified_cpp_dom_indexedDB1.o.pp   /build/objdir/dom/indexedDB/Unified_cpp_dom_indexedDB1.cpp
building of '/nix/store/jlsr3zgfl744iiww7hbh4mgh4769gar5-thunderbird-60.2.1.drv' timed out after 1800 seconds
error: build of '/nix/store/jlsr3zgfl744iiww7hbh4mgh4769gar5-thunderbird-60.2.1.drv' failed

@andir andir merged commit 34f8383 into NixOS:release-18.03 Oct 4, 2018
@andir andir deleted the 18.03/thunderbird branch October 4, 2018 17:17
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

3 participants