aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-08-07 23:06:02 -0400
committerMark H Weaver <mhw@netris.org>2015-08-07 23:08:41 -0400
commita5e55dfbb7318f8c79e9d56f8c8dcd5b20566efb (patch)
tree757e9677aa340a68e66f41b9c1c3765cd05e76ea /gnu/packages/patches
parentff6f33cf80d04717cad90177c934ae5b2dd6086c (diff)
downloadguix-a5e55dfbb7318f8c79e9d56f8c8dcd5b20566efb.tar
guix-a5e55dfbb7318f8c79e9d56f8c8dcd5b20566efb.tar.gz
gnu: icecat: Add fix for CVE-2015-4495.
* gnu/packages/patches/icecat-CVE-2015-4495.patch: New file. * gnu-system.am (dist_patch_DATA): Add it. * gnu/packages/gnuzilla.scm (icecat)[source]: Add patch. Move the 'patches' field above the snippet.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/icecat-CVE-2015-4495.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnu/packages/patches/icecat-CVE-2015-4495.patch b/gnu/packages/patches/icecat-CVE-2015-4495.patch
new file mode 100644
index 0000000000..e7514d9a5e
--- /dev/null
+++ b/gnu/packages/patches/icecat-CVE-2015-4495.patch
@@ -0,0 +1,28 @@
+Backported from upstream commits labelled "Bug 1178058" from the esr38 branch
+by Boris Zbarsky <bzbarsky@mit.edu> and Bobby Holley <bobbyholley@gmail.com>.
+
+--- icecat-31.8.0/docshell/base/nsDocShell.cpp
++++ icecat-31.8.0/docshell/base/nsDocShell.cpp
+@@ -1546,12 +1546,21 @@
+
+ if (owner && mItemType != typeChrome) {
+ nsCOMPtr<nsIPrincipal> ownerPrincipal = do_QueryInterface(owner);
+- if (nsContentUtils::IsSystemOrExpandedPrincipal(ownerPrincipal)) {
++ if (nsContentUtils::IsSystemPrincipal(ownerPrincipal)) {
+ if (ownerIsExplicit) {
+ return NS_ERROR_DOM_SECURITY_ERR;
+ }
+ owner = nullptr;
+ inheritOwner = true;
++ } else if (nsContentUtils::IsExpandedPrincipal(ownerPrincipal)) {
++ if (ownerIsExplicit) {
++ return NS_ERROR_DOM_SECURITY_ERR;
++ }
++ // Don't inherit from the current page. Just do the safe thing
++ // and pretend that we were loaded by a nullprincipal.
++ owner = do_CreateInstance("@mozilla.org/nullprincipal;1");
++ NS_ENSURE_TRUE(owner, NS_ERROR_FAILURE);
++ inheritOwner = false;
+ }
+ }
+ if (!owner && !inheritOwner && !ownerIsExplicit) {