summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-01-16 03:52:05 -0500
committerMark H Weaver <mhw@netris.org>2015-01-16 09:14:08 -0500
commit2a666e9cfddc5ec25831618bc376ab4ca6692527 (patch)
treeea21d6d2100179e96b5948a2e3361d838ba0b148 /gnu
parent57b7e1a62d2269bfd9d37f88bae92c829222f8fc (diff)
gnu: icecat: Add fixes for CVE-2014-{8634,8638,8639,8641}.
* gnu/packages/patches/icecat-CVE-2014-8634-pt1.patch, gnu/packages/patches/icecat-CVE-2014-8634-pt2.patch, gnu/packages/patches/icecat-CVE-2014-8638-pt1.patch, gnu/packages/patches/icecat-CVE-2014-8638-pt2.patch, gnu/packages/patches/icecat-CVE-2014-8639.patch, gnu/packages/patches/icecat-CVE-2014-8641.patch, gnu/packages/patches/icecat-armhf-xpcom.patch: New files. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/gnuzilla.scm (icecat)[source]: Add patches.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/gnuzilla.scm11
-rw-r--r--gnu/packages/patches/icecat-CVE-2014-8634-pt1.patch410
-rw-r--r--gnu/packages/patches/icecat-CVE-2014-8634-pt2.patch30
-rw-r--r--gnu/packages/patches/icecat-CVE-2014-8638-pt1.patch27
-rw-r--r--gnu/packages/patches/icecat-CVE-2014-8638-pt2.patch149
-rw-r--r--gnu/packages/patches/icecat-CVE-2014-8639.patch92
-rw-r--r--gnu/packages/patches/icecat-CVE-2014-8641.patch29
-rw-r--r--gnu/packages/patches/icecat-armhf-xpcom.patch25
8 files changed, 771 insertions, 2 deletions
diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm
index 8e397464acd..9c6b39f3d28 100644
--- a/gnu/packages/gnuzilla.scm
+++ b/gnu/packages/gnuzilla.scm
@@ -1,7 +1,7 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> 2;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
3;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> 3;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
4;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> 4;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> 5;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
6;;; 6;;;
7;;; This file is part of GNU Guix. 7;;; This file is part of GNU Guix.
@@ -231,7 +231,14 @@ standards.")
231 "icecat-CVE-2014-1590.patch" 231 "icecat-CVE-2014-1590.patch"
232 "icecat-CVE-2014-1592.patch" 232 "icecat-CVE-2014-1592.patch"
233 "icecat-CVE-2014-1593.patch" 233 "icecat-CVE-2014-1593.patch"
234 "icecat-CVE-2014-1594.patch"))))) 234 "icecat-CVE-2014-1594.patch"
235 "icecat-armhf-xpcom.patch"
236 "icecat-CVE-2014-8639.patch"
237 "icecat-CVE-2014-8634-pt1.patch"
238 "icecat-CVE-2014-8634-pt2.patch"
239 "icecat-CVE-2014-8641.patch"
240 "icecat-CVE-2014-8638-pt1.patch"
241 "icecat-CVE-2014-8638-pt2.patch")))))
235 (build-system gnu-build-system) 242 (build-system gnu-build-system)
236 (inputs 243 (inputs
237 `(("alsa-lib" ,alsa-lib) 244 `(("alsa-lib" ,alsa-lib)
diff --git a/gnu/packages/patches/icecat-CVE-2014-8634-pt1.patch b/gnu/packages/patches/icecat-CVE-2014-8634-pt1.patch
new file mode 100644
index 00000000000..3d2f81e24a2
--- /dev/null
+++ b/gnu/packages/patches/icecat-CVE-2014-8634-pt1.patch
@@ -0,0 +1,410 @@
1From 4f447768a2ff6bf37d462e033c11e20c733129ba Mon Sep 17 00:00:00 2001
2From: Jan de Mooij <jdemooij@mozilla.com>
3Date: Tue, 16 Dec 2014 22:52:51 +0100
4Subject: [PATCH] Bug 1109889 - Share more exception handling code. r=nbp,
5 a=abillings
6
7---
8 js/src/jit/Ion.cpp | 11 ++++++++++-
9 js/src/jit/IonMacroAssembler.cpp | 8 ++++----
10 js/src/jit/JitCompartment.h | 8 ++++++--
11 js/src/jit/arm/MacroAssembler-arm.cpp | 11 ++---------
12 js/src/jit/arm/MacroAssembler-arm.h | 6 ++++--
13 js/src/jit/arm/Trampoline-arm.cpp | 4 ++--
14 js/src/jit/mips/MacroAssembler-mips.cpp | 11 ++---------
15 js/src/jit/mips/MacroAssembler-mips.h | 7 +++++--
16 js/src/jit/mips/Trampoline-mips.cpp | 4 ++--
17 js/src/jit/shared/MacroAssembler-x86-shared.h | 3 +++
18 js/src/jit/x64/MacroAssembler-x64.cpp | 11 ++---------
19 js/src/jit/x64/MacroAssembler-x64.h | 3 +--
20 js/src/jit/x64/Trampoline-x64.cpp | 4 ++--
21 js/src/jit/x86/MacroAssembler-x86.cpp | 11 ++---------
22 js/src/jit/x86/MacroAssembler-x86.h | 3 +--
23 js/src/jit/x86/Trampoline-x86.cpp | 4 ++--
24 16 files changed, 50 insertions(+), 59 deletions(-)
25
26diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp
27index 9635742..a77f9b4 100644
28--- a/js/src/jit/Ion.cpp
29+++ b/js/src/jit/Ion.cpp
30@@ -150,6 +150,7 @@ JitRuntime::JitRuntime()
31 : execAlloc_(nullptr),
32 ionAlloc_(nullptr),
33 exceptionTail_(nullptr),
34+ exceptionTailParallel_(nullptr),
35 bailoutTail_(nullptr),
36 enterJIT_(nullptr),
37 bailoutHandler_(nullptr),
38@@ -198,10 +199,18 @@ JitRuntime::initialize(JSContext *cx)
39 return false;
40
41 IonSpew(IonSpew_Codegen, "# Emitting exception tail stub");
42- exceptionTail_ = generateExceptionTailStub(cx);
43+
44+ void *handler = JS_FUNC_TO_DATA_PTR(void *, jit::HandleException);
45+ void *handlerParallel = JS_FUNC_TO_DATA_PTR(void *, jit::HandleParallelFailure);
46+
47+ exceptionTail_ = generateExceptionTailStub(cx, handler);
48 if (!exceptionTail_)
49 return false;
50
51+ exceptionTailParallel_ = generateExceptionTailStub(cx, handlerParallel);
52+ if (!exceptionTailParallel_)
53+ return false;
54+
55 IonSpew(IonSpew_Codegen, "# Emitting bailout tail stub");
56 bailoutTail_ = generateBailoutTailStub(cx);
57 if (!bailoutTail_)
58diff --git a/js/src/jit/IonMacroAssembler.cpp b/js/src/jit/IonMacroAssembler.cpp
59index 2326fe1..9f7cc8f 100644
60--- a/js/src/jit/IonMacroAssembler.cpp
61+++ b/js/src/jit/IonMacroAssembler.cpp
62@@ -1030,18 +1030,18 @@ MacroAssembler::handleFailure(ExecutionMode executionMode)
63 sps_->skipNextReenter();
64 leaveSPSFrame();
65
66- void *handler;
67+ JitCode *excTail;
68 switch (executionMode) {
69 case SequentialExecution:
70- handler = JS_FUNC_TO_DATA_PTR(void *, jit::HandleException);
71+ excTail = GetIonContext()->runtime->jitRuntime()->getExceptionTail();
72 break;
73 case ParallelExecution:
74- handler = JS_FUNC_TO_DATA_PTR(void *, jit::HandleParallelFailure);
75+ excTail = GetIonContext()->runtime->jitRuntime()->getExceptionTailParallel();
76 break;
77 default:
78 MOZ_ASSUME_UNREACHABLE("No such execution mode");
79 }
80- MacroAssemblerSpecific::handleFailureWithHandler(handler);
81+ jump(excTail);
82
83 // Doesn't actually emit code, but balances the leave()
84 if (sps_)
85diff --git a/js/src/jit/JitCompartment.h b/js/src/jit/JitCompartment.h
86index 486a29d..475a685 100644
87--- a/js/src/jit/JitCompartment.h
88+++ b/js/src/jit/JitCompartment.h
89@@ -153,8 +153,9 @@ class JitRuntime
90 // need for explicit interrupt checks.
91 JSC::ExecutableAllocator *ionAlloc_;
92
93- // Shared post-exception-handler tail
94+ // Shared exception-handler tail.
95 JitCode *exceptionTail_;
96+ JitCode *exceptionTailParallel_;
97
98 // Shared post-bailout-handler tail.
99 JitCode *bailoutTail_;
100@@ -214,7 +215,7 @@ class JitRuntime
101 InlineList<PatchableBackedge> backedgeList_;
102
103 private:
104- JitCode *generateExceptionTailStub(JSContext *cx);
105+ JitCode *generateExceptionTailStub(JSContext *cx, void *handler);
106 JitCode *generateBailoutTailStub(JSContext *cx);
107 JitCode *generateEnterJIT(JSContext *cx, EnterJitType type);
108 JitCode *generateArgumentsRectifier(JSContext *cx, ExecutionMode mode, void **returnAddrOut);
109@@ -287,6 +288,9 @@ class JitRuntime
110 JitCode *getExceptionTail() const {
111 return exceptionTail_;
112 }
113+ JitCode *getExceptionTailParallel() const {
114+ return exceptionTailParallel_;
115+ }
116
117 JitCode *getBailoutTail() const {
118 return bailoutTail_;
119diff --git a/js/src/jit/arm/MacroAssembler-arm.cpp b/js/src/jit/arm/MacroAssembler-arm.cpp
120index b34483c..63b3ff2 100644
121--- a/js/src/jit/arm/MacroAssembler-arm.cpp
122+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
123@@ -3984,25 +3984,18 @@ MacroAssemblerARMCompat::callWithABI(const Address &fun, MoveOp::Type result)
124 }
125
126 void
127-MacroAssemblerARMCompat::handleFailureWithHandler(void *handler)
128+MacroAssemblerARMCompat::handleFailureWithHandlerTail(void *handler)
129 {
130 // Reserve space for exception information.
131 int size = (sizeof(ResumeFromException) + 7) & ~7;
132 ma_sub(Imm32(size), sp);
133 ma_mov(sp, r0);
134
135- // Ask for an exception handler.
136+ // Call the handler.
137 setupUnalignedABICall(1, r1);
138 passABIArg(r0);
139 callWithABI(handler);
140
141- JitCode *excTail = GetIonContext()->runtime->jitRuntime()->getExceptionTail();
142- branch(excTail);
143-}
144-
145-void
146-MacroAssemblerARMCompat::handleFailureWithHandlerTail()
147-{
148 Label entryFrame;
149 Label catch_;
150 Label finally;
151diff --git a/js/src/jit/arm/MacroAssembler-arm.h b/js/src/jit/arm/MacroAssembler-arm.h
152index 00e8a03..6ccc0be 100644
153--- a/js/src/jit/arm/MacroAssembler-arm.h
154+++ b/js/src/jit/arm/MacroAssembler-arm.h
155@@ -711,6 +711,9 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
156 void jump(Label *label) {
157 as_b(label);
158 }
159+ void jump(JitCode *code) {
160+ branch(code);
161+ }
162 void jump(Register reg) {
163 ma_bx(reg);
164 }
165@@ -1202,8 +1205,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
166
167 void linkExitFrame();
168 void linkParallelExitFrame(const Register &pt);
169- void handleFailureWithHandler(void *handler);
170- void handleFailureWithHandlerTail();
171+ void handleFailureWithHandlerTail(void *handler);
172
173 /////////////////////////////////////////////////////////////////
174 // Common interface.
175diff --git a/js/src/jit/arm/Trampoline-arm.cpp b/js/src/jit/arm/Trampoline-arm.cpp
176index e539c00..693dad8 100644
177--- a/js/src/jit/arm/Trampoline-arm.cpp
178+++ b/js/src/jit/arm/Trampoline-arm.cpp
179@@ -928,11 +928,11 @@ JitRuntime::generateDebugTrapHandler(JSContext *cx)
180 }
181
182 JitCode *
183-JitRuntime::generateExceptionTailStub(JSContext *cx)
184+JitRuntime::generateExceptionTailStub(JSContext *cx, void *handler)
185 {
186 MacroAssembler masm;
187
188- masm.handleFailureWithHandlerTail();
189+ masm.handleFailureWithHandlerTail(handler);
190
191 Linker linker(masm);
192 AutoFlushICache afc("ExceptionTailStub");
193diff --git a/js/src/jit/mips/MacroAssembler-mips.cpp b/js/src/jit/mips/MacroAssembler-mips.cpp
194index cee93a5..256434d 100644
195--- a/js/src/jit/mips/MacroAssembler-mips.cpp
196+++ b/js/src/jit/mips/MacroAssembler-mips.cpp
197@@ -3139,25 +3139,18 @@ MacroAssemblerMIPSCompat::callWithABI(const Address &fun, MoveOp::Type result)
198 }
199
200 void
201-MacroAssemblerMIPSCompat::handleFailureWithHandler(void *handler)
202+MacroAssemblerMIPSCompat::handleFailureWithHandlerTail(void *handler)
203 {
204 // Reserve space for exception information.
205 int size = (sizeof(ResumeFromException) + StackAlignment) & ~(StackAlignment - 1);
206 ma_subu(StackPointer, StackPointer, Imm32(size));
207 ma_move(a0, StackPointer); // Use a0 since it is a first function argument
208
209- // Ask for an exception handler.
210+ // Call the handler.
211 setupUnalignedABICall(1, a1);
212 passABIArg(a0);
213 callWithABI(handler);
214
215- JitCode *excTail = GetIonContext()->runtime->jitRuntime()->getExceptionTail();
216- branch(excTail);
217-}
218-
219-void
220-MacroAssemblerMIPSCompat::handleFailureWithHandlerTail()
221-{
222 Label entryFrame;
223 Label catch_;
224 Label finally;
225diff --git a/js/src/jit/mips/MacroAssembler-mips.h b/js/src/jit/mips/MacroAssembler-mips.h
226index ed1f566..899a50e 100644
227--- a/js/src/jit/mips/MacroAssembler-mips.h
228+++ b/js/src/jit/mips/MacroAssembler-mips.h
229@@ -481,6 +481,10 @@ class MacroAssemblerMIPSCompat : public MacroAssemblerMIPS
230 as_nop();
231 }
232
233+ void jump(JitCode *code) {
234+ branch(code);
235+ }
236+
237 void neg32(Register reg) {
238 ma_negu(reg, reg);
239 }
240@@ -842,8 +846,7 @@ public:
241
242 void linkExitFrame();
243 void linkParallelExitFrame(const Register &pt);
244- void handleFailureWithHandler(void *handler);
245- void handleFailureWithHandlerTail();
246+ void handleFailureWithHandlerTail(void *handler);
247
248 /////////////////////////////////////////////////////////////////
249 // Common interface.
250diff --git a/js/src/jit/mips/Trampoline-mips.cpp b/js/src/jit/mips/Trampoline-mips.cpp
251index b456845..64c2385 100644
252--- a/js/src/jit/mips/Trampoline-mips.cpp
253+++ b/js/src/jit/mips/Trampoline-mips.cpp
254@@ -960,11 +960,11 @@ JitRuntime::generateDebugTrapHandler(JSContext *cx)
255
256
257 JitCode *
258-JitRuntime::generateExceptionTailStub(JSContext *cx)
259+JitRuntime::generateExceptionTailStub(JSContext *cx, void *handler)
260 {
261 MacroAssembler masm;
262
263- masm.handleFailureWithHandlerTail();
264+ masm.handleFailureWithHandlerTail(handler);
265
266 Linker linker(masm);
267 AutoFlushICache afc("ExceptionTailStub");
268diff --git a/js/src/jit/shared/MacroAssembler-x86-shared.h b/js/src/jit/shared/MacroAssembler-x86-shared.h
269index 01d1a4b..779cf83 100644
270--- a/js/src/jit/shared/MacroAssembler-x86-shared.h
271+++ b/js/src/jit/shared/MacroAssembler-x86-shared.h
272@@ -287,6 +287,9 @@ class MacroAssemblerX86Shared : public Assembler
273 void jump(Label *label) {
274 jmp(label);
275 }
276+ void jump(JitCode *code) {
277+ jmp(code);
278+ }
279 void jump(RepatchLabel *label) {
280 jmp(label);
281 }
282diff --git a/js/src/jit/x64/MacroAssembler-x64.cpp b/js/src/jit/x64/MacroAssembler-x64.cpp
283index 9a9f995..0db799c 100644
284--- a/js/src/jit/x64/MacroAssembler-x64.cpp
285+++ b/js/src/jit/x64/MacroAssembler-x64.cpp
286@@ -287,24 +287,17 @@ MacroAssemblerX64::callWithABI(Address fun, MoveOp::Type result)
287 }
288
289 void
290-MacroAssemblerX64::handleFailureWithHandler(void *handler)
291+MacroAssemblerX64::handleFailureWithHandlerTail(void *handler)
292 {
293 // Reserve space for exception information.
294 subq(Imm32(sizeof(ResumeFromException)), rsp);
295 movq(rsp, rax);
296
297- // Ask for an exception handler.
298+ // Call the handler.
299 setupUnalignedABICall(1, rcx);
300 passABIArg(rax);
301 callWithABI(handler);
302
303- JitCode *excTail = GetIonContext()->runtime->jitRuntime()->getExceptionTail();
304- jmp(excTail);
305-}
306-
307-void
308-MacroAssemblerX64::handleFailureWithHandlerTail()
309-{
310 Label entryFrame;
311 Label catch_;
312 Label finally;
313diff --git a/js/src/jit/x64/MacroAssembler-x64.h b/js/src/jit/x64/MacroAssembler-x64.h
314index 2c11e9a..5010549 100644
315--- a/js/src/jit/x64/MacroAssembler-x64.h
316+++ b/js/src/jit/x64/MacroAssembler-x64.h
317@@ -1288,8 +1288,7 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
318 void callWithABI(AsmJSImmPtr imm, MoveOp::Type result = MoveOp::GENERAL);
319 void callWithABI(Address fun, MoveOp::Type result = MoveOp::GENERAL);
320
321- void handleFailureWithHandler(void *handler);
322- void handleFailureWithHandlerTail();
323+ void handleFailureWithHandlerTail(void *handler);
324
325 void makeFrameDescriptor(Register frameSizeReg, FrameType type) {
326 shlq(Imm32(FRAMESIZE_SHIFT), frameSizeReg);
327diff --git a/js/src/jit/x64/Trampoline-x64.cpp b/js/src/jit/x64/Trampoline-x64.cpp
328index 72f4592..3b83850 100644
329--- a/js/src/jit/x64/Trampoline-x64.cpp
330+++ b/js/src/jit/x64/Trampoline-x64.cpp
331@@ -785,11 +785,11 @@ JitRuntime::generateDebugTrapHandler(JSContext *cx)
332 }
333
334 JitCode *
335-JitRuntime::generateExceptionTailStub(JSContext *cx)
336+JitRuntime::generateExceptionTailStub(JSContext *cx, void *handler)
337 {
338 MacroAssembler masm;
339
340- masm.handleFailureWithHandlerTail();
341+ masm.handleFailureWithHandlerTail(handler);
342
343 Linker linker(masm);
344 JitCode *code = linker.newCode<NoGC>(cx, JSC::OTHER_CODE);
345diff --git a/js/src/jit/x86/MacroAssembler-x86.cpp b/js/src/jit/x86/MacroAssembler-x86.cpp
346index d36f4d3..57a0f85 100644
347--- a/js/src/jit/x86/MacroAssembler-x86.cpp
348+++ b/js/src/jit/x86/MacroAssembler-x86.cpp
349@@ -281,24 +281,17 @@ MacroAssemblerX86::callWithABI(const Address &fun, MoveOp::Type result)
350 }
351
352 void
353-MacroAssemblerX86::handleFailureWithHandler(void *handler)
354+MacroAssemblerX86::handleFailureWithHandlerTail(void *handler)
355 {
356 // Reserve space for exception information.
357 subl(Imm32(sizeof(ResumeFromException)), esp);
358 movl(esp, eax);
359
360- // Ask for an exception handler.
361+ // Call the handler.
362 setupUnalignedABICall(1, ecx);
363 passABIArg(eax);
364 callWithABI(handler);
365
366- JitCode *excTail = GetIonContext()->runtime->jitRuntime()->getExceptionTail();
367- jmp(excTail);
368-}
369-
370-void
371-MacroAssemblerX86::handleFailureWithHandlerTail()
372-{
373 Label entryFrame;
374 Label catch_;
375 Label finally;
376diff --git a/js/src/jit/x86/MacroAssembler-x86.h b/js/src/jit/x86/MacroAssembler-x86.h
377index 17de7a7..7e578c8 100644
378--- a/js/src/jit/x86/MacroAssembler-x86.h
379+++ b/js/src/jit/x86/MacroAssembler-x86.h
380@@ -1086,8 +1086,7 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
381 void callWithABI(const Address &fun, MoveOp::Type result = MoveOp::GENERAL);
382
383 // Used from within an Exit frame to handle a pending exception.
384- void handleFailureWithHandler(void *handler);
385- void handleFailureWithHandlerTail();
386+ void handleFailureWithHandlerTail(void *handler);
387
388 void makeFrameDescriptor(Register frameSizeReg, FrameType type) {
389 shll(Imm32(FRAMESIZE_SHIFT), frameSizeReg);
390diff --git a/js/src/jit/x86/Trampoline-x86.cpp b/js/src/jit/x86/Trampoline-x86.cpp
391index 0a2f0de..9fd2c00 100644
392--- a/js/src/jit/x86/Trampoline-x86.cpp
393+++ b/js/src/jit/x86/Trampoline-x86.cpp
394@@ -827,11 +827,11 @@ JitRuntime::generateDebugTrapHandler(JSContext *cx)
395 }
396
397 JitCode *
398-JitRuntime::generateExceptionTailStub(JSContext *cx)
399+JitRuntime::generateExceptionTailStub(JSContext *cx, void *handler)
400 {
401 MacroAssembler masm;
402
403- masm.handleFailureWithHandlerTail();
404+ masm.handleFailureWithHandlerTail(handler);
405
406 Linker linker(masm);
407 JitCode *code = linker.newCode<NoGC>(cx, JSC::OTHER_CODE);
408--
4092.1.2
410
diff --git a/gnu/packages/patches/icecat-CVE-2014-8634-pt2.patch b/gnu/packages/patches/icecat-CVE-2014-8634-pt2.patch
new file mode 100644
index 00000000000..d7f68e9df30
--- /dev/null
+++ b/gnu/packages/patches/icecat-CVE-2014-8634-pt2.patch
@@ -0,0 +1,30 @@
1From e5de31c8f927b1aa06dde02c356cda33beb463d9 Mon Sep 17 00:00:00 2001
2From: Kyle Huey <khuey@kylehuey.com>
3Date: Fri, 19 Dec 2014 18:16:17 -0800
4Subject: [PATCH] Bug 1111737. r=smaug, a=bkerensa
5
6---
7 content/base/src/nsScriptLoader.cpp | 7 ++++++-
8 1 file changed, 6 insertions(+), 1 deletion(-)
9
10diff --git a/content/base/src/nsScriptLoader.cpp b/content/base/src/nsScriptLoader.cpp
11index a6a4c34..7f3a76e 100644
12--- a/content/base/src/nsScriptLoader.cpp
13+++ b/content/base/src/nsScriptLoader.cpp
14@@ -812,7 +812,12 @@ NotifyOffThreadScriptLoadCompletedRunnable::Run()
15 {
16 MOZ_ASSERT(NS_IsMainThread());
17
18- nsresult rv = mLoader->ProcessOffThreadRequest(mRequest, &mToken);
19+ // We want these to be dropped on the main thread, once we return from this
20+ // function.
21+ nsRefPtr<nsScriptLoadRequest> request = mRequest.forget();
22+ nsRefPtr<nsScriptLoader> loader = mLoader.forget();
23+
24+ nsresult rv = loader->ProcessOffThreadRequest(request, &mToken);
25
26 if (mToken) {
27 // The result of the off thread parse was not actually needed to process
28--
292.1.2
30
diff --git a/gnu/packages/patches/icecat-CVE-2014-8638-pt1.patch b/gnu/packages/patches/icecat-CVE-2014-8638-pt1.patch
new file mode 100644
index 00000000000..83ee5fc79e6
--- /dev/null
+++ b/gnu/packages/patches/icecat-CVE-2014-8638-pt1.patch
@@ -0,0 +1,27 @@
1From 0c4a326295bdb37742fe23f0395916d2ba8ade53 Mon Sep 17 00:00:00 2001
2From: Christoph Kerschbaumer <mozilla@christophkerschbaumer.com>
3Date: Wed, 19 Nov 2014 16:03:39 -0800
4Subject: [PATCH 1/2] Bug 1080987 - navigator.sendBeacon() needs to sent origin
5 header. r=sicking, a=bkerensa
6
7---
8 dom/base/Navigator.cpp | 3 +++
9 1 file changed, 3 insertions(+)
10
11diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
12index 0f03ad3..020e370 100644
13--- a/dom/base/Navigator.cpp
14+++ b/dom/base/Navigator.cpp
15@@ -1265,6 +1265,9 @@ Navigator::SendBeacon(const nsAString& aUrl,
16 principal,
17 true);
18
19+ rv = cors->Init(channel, true);
20+ NS_ENSURE_SUCCESS(rv, false);
21+
22 // Start a preflight if cross-origin and content type is not whitelisted
23 rv = secMan->CheckSameOriginURI(documentURI, uri, false);
24 bool crossOrigin = NS_FAILED(rv);
25--
262.1.2
27
diff --git a/gnu/packages/patches/icecat-CVE-2014-8638-pt2.patch b/gnu/packages/patches/icecat-CVE-2014-8638-pt2.patch
new file mode 100644
index 00000000000..4e439efb892
--- /dev/null
+++ b/gnu/packages/patches/icecat-CVE-2014-8638-pt2.patch
@@ -0,0 +1,149 @@
1From 0d47e593c685313571aaa00cb7341b458123c82f Mon Sep 17 00:00:00 2001
2From: Christoph Kerschbaumer <mozilla@christophkerschbaumer.com>
3Date: Wed, 19 Nov 2014 16:03:30 -0800
4Subject: [PATCH 2/2] Bug 1080987 - navigator.sendBeacon() needs to sent origin
5 header - test. r=sicking, a=bkerensa
6
7---
8 .../beacon/beacon-originheader-handler.sjs | 41 ++++++++++++++
9 dom/tests/mochitest/beacon/mochitest.ini | 2 +
10 .../mochitest/beacon/test_beaconOriginHeader.html | 64 ++++++++++++++++++++++
11 3 files changed, 107 insertions(+)
12 create mode 100644 dom/tests/mochitest/beacon/beacon-originheader-handler.sjs
13 create mode 100644 dom/tests/mochitest/beacon/test_beaconOriginHeader.html
14
15diff --git a/dom/tests/mochitest/beacon/beacon-originheader-handler.sjs b/dom/tests/mochitest/beacon/beacon-originheader-handler.sjs
16new file mode 100644
17index 0000000..baed22c
18--- /dev/null
19+++ b/dom/tests/mochitest/beacon/beacon-originheader-handler.sjs
20@@ -0,0 +1,41 @@
21+/*
22+ * TestSever customized specifically for the needs of:
23+ * Bug 1080987 - navigator.sendBeacon() needs to sent origin header
24+ */
25+
26+function handleRequest(request, response)
27+{
28+ response.setHeader("Cache-Control", "no-cache", false);
29+ response.setHeader("Content-Type", "text/plain", false);
30+
31+ // case XHR-REQUEST: the xhr-request tries to query the
32+ // stored header from the beacon request.
33+ if (request.queryString == "queryheader") {
34+ var header = getState("originHeader");
35+ // if the beacon already stored the header - return.
36+ if (header) {
37+ response.write(header);
38+ setState("originHeader", "");
39+ return;
40+ }
41+ // otherwise wait for the beacon request
42+ response.processAsync();
43+ setObjectState("xhr-response", response);
44+ return;
45+ }
46+
47+ // case BEACON-REQUEST: get the beacon header and
48+ // store the header on the server.
49+ var header = request.getHeader("origin");
50+ setState("originHeader", header);
51+
52+ // if there is an xhr-request waiting, return the header now.
53+ getObjectState("xhr-response", function(xhrResponse) {
54+ if (!xhrResponse) {
55+ return;
56+ }
57+ setState("originHeader", "");
58+ xhrResponse.write(header);
59+ xhrResponse.finish();
60+ });
61+}
62diff --git a/dom/tests/mochitest/beacon/mochitest.ini b/dom/tests/mochitest/beacon/mochitest.ini
63index f65276e..6681fa4 100644
64--- a/dom/tests/mochitest/beacon/mochitest.ini
65+++ b/dom/tests/mochitest/beacon/mochitest.ini
66@@ -2,8 +2,10 @@
67 skip-if = buildapp == 'b2g' || e10s
68 support-files = beacon-frame.html
69 beacon-handler.sjs
70+ beacon-originheader-handler.sjs
71
72 [test_beacon.html]
73 [test_beaconFrame.html]
74 [test_beaconPreflight.html]
75 [test_beaconContentPolicy.html]
76+[test_beaconOriginHeader.html]
77diff --git a/dom/tests/mochitest/beacon/test_beaconOriginHeader.html b/dom/tests/mochitest/beacon/test_beaconOriginHeader.html
78new file mode 100644
79index 0000000..b5684a9
80--- /dev/null
81+++ b/dom/tests/mochitest/beacon/test_beaconOriginHeader.html
82@@ -0,0 +1,64 @@
83+<!DOCTYPE HTML>
84+<html>
85+<head>
86+ <title>Bug 1080987 - navigator.sendBeacon() needs to sent origin header</title>
87+ <!-- Including SimpleTest.js so we can use waitForExplicitFinish !-->
88+ <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
89+ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
90+</head>
91+<body>
92+ <p id="display"></p>
93+ <div id="content" style="visibility: hidden">
94+ <iframe style="width:100%;" id="testframe"></iframe>
95+ </div>
96+
97+<script class="testbody" type="text/javascript">
98+
99+SimpleTest.waitForExplicitFinish();
100+
101+const BEACON_URL = "http://example.com/tests/dom/tests/mochitest/beacon/beacon-originheader-handler.sjs";
102+const ORIGIN_HEADER = "http://mochi.test:8888";
103+
104+/* Description of the test:
105+ * We call sendBeacon() cross origin and make sure that the
106+ * origin header is actually set in the request.
107+ *
108+ * Since sendBeacon() does not expect any response, we are storing the
109+ * header on the server (*.sjs) and use an XMLHttpRequest to actually
110+ * retrieve the header back from the server. We assert that the header
111+ * is indeed correct. Since sendBeacon() and also the XMLHttpRequest()
112+ * are performed in an asynchronous fashion, there is no guarantee that
113+ * the sendBeacon() is actually executed before the XMLHttpRequest().
114+ * Hence the xhr-response might be processed asynchronously.
115+ */
116+
117+SpecialPowers.pushPrefEnv({'set': [["beacon.enabled", true]]}, runTest);
118+
119+function queryHeaderFromServer() {
120+ var xhr = new XMLHttpRequest();
121+ xhr.open("GET", "beacon-originheader-handler.sjs?queryheader", true);
122+ xhr.onload = function() {
123+ is(xhr.responseText, ORIGIN_HEADER, "SendBeacon sends right origin header");
124+ SimpleTest.finish();
125+ };
126+ xhr.onerror = function() {
127+ ok(false, "xhr request returned error");
128+ SimpleTest.finish();
129+ };
130+ xhr.send();
131+}
132+
133+function runTest() {
134+ // generate data and send beacon
135+ var formData = new FormData();
136+ formData.append('name', 'value');
137+ navigator.sendBeacon(BEACON_URL, formData);
138+
139+ // start quering the result from the server
140+ queryHeaderFromServer();
141+}
142+
143+</script>
144+</pre>
145+</body>
146+</html>
147--
1482.1.2
149
diff --git a/gnu/packages/patches/icecat-CVE-2014-8639.patch b/gnu/packages/patches/icecat-CVE-2014-8639.patch
new file mode 100644
index 00000000000..2610765f438
--- /dev/null
+++ b/gnu/packages/patches/icecat-CVE-2014-8639.patch
@@ -0,0 +1,92 @@
1From f80b2eefd451b8ed0fd783d9b9ed0412c8d46efd Mon Sep 17 00:00:00 2001
2From: Patrick McManus <mcmanus@ducksong.com>
3Date: Thu, 11 Dec 2014 13:55:16 -0500
4Subject: [PATCH] bug 1095859 - proxy tweak r=valentin.gosu a=bkerensa
5
6---
7 netwerk/protocol/http/nsHttpChannel.cpp | 7 ++++++-
8 netwerk/test/unit/test_auth_proxy.js | 29 +++++++++++++++++++++++++++++
9 2 files changed, 35 insertions(+), 1 deletion(-)
10
11diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp
12index f20e033..35e71c7 100644
13--- a/netwerk/protocol/http/nsHttpChannel.cpp
14+++ b/netwerk/protocol/http/nsHttpChannel.cpp
15@@ -1237,7 +1237,12 @@ nsHttpChannel::ProcessResponse()
16 // notify "http-on-examine-response" observers
17 gHttpHandler->OnExamineResponse(this);
18
19- SetCookie(mResponseHead->PeekHeader(nsHttp::Set_Cookie));
20+ // Cookies should not be handled on proxy failure either.
21+ // This would be consolidated with ProcessSecurityHeaders but it should
22+ // happen after OnExamineResponse.
23+ if (!mTransaction->ProxyConnectFailed() && (httpStatus != 407)) {
24+ SetCookie(mResponseHead->PeekHeader(nsHttp::Set_Cookie));
25+ }
26
27 // handle unused username and password in url (see bug 232567)
28 if (httpStatus != 401 && httpStatus != 407) {
29diff --git a/netwerk/test/unit/test_auth_proxy.js b/netwerk/test/unit/test_auth_proxy.js
30index 6af4e98..9275d6d 100644
31--- a/netwerk/test/unit/test_auth_proxy.js
32+++ b/netwerk/test/unit/test_auth_proxy.js
33@@ -172,6 +172,12 @@ var listener = {
34 // If we expect 200, the request should have succeeded
35 do_check_eq(this.expectedCode == 200, request.requestSucceeded);
36
37+ var cookie = "";
38+ try {
39+ cookie = request.getRequestHeader("Cookie");
40+ } catch (e) { }
41+ do_check_eq(cookie, "");
42+
43 } catch (e) {
44 do_throw("Unexpected exception: " + e);
45 }
46@@ -261,6 +267,25 @@ function test_all_ok() {
47 do_test_pending();
48 }
49
50+function test_proxy_407_cookie() {
51+ var chan = makeChan();
52+ chan.notificationCallbacks = new Requestor(FLAG_RETURN_FALSE, 0);
53+ chan.setRequestHeader("X-Set-407-Cookie", "1", false);
54+ listener.expectedCode = 407; // Proxy Unauthorized
55+ chan.asyncOpen(listener, null);
56+
57+ do_test_pending();
58+}
59+
60+function test_proxy_200_cookie() {
61+ var chan = makeChan();
62+ chan.notificationCallbacks = new Requestor(0, 0);
63+ chan.setRequestHeader("X-Set-407-Cookie", "1", false);
64+ listener.expectedCode = 200; // OK
65+ chan.asyncOpen(listener, null);
66+ do_test_pending();
67+}
68+
69 function test_host_returnfalse() {
70 dump("\ntest: host returnfalse\n");
71 var chan = makeChan();
72@@ -301,6 +326,7 @@ function test_proxy_wrongpw_host_returnfalse() {
73 }
74
75 var tests = [test_proxy_returnfalse, test_proxy_wrongpw, test_all_ok,
76+ test_proxy_407_cookie, test_proxy_200_cookie,
77 test_host_returnfalse, test_host_wrongpw,
78 test_proxy_wrongpw_host_wrongpw, test_proxy_wrongpw_host_returnfalse];
79
80@@ -331,6 +357,9 @@ function proxyAuthHandler(metadata, response) {
81 "Unauthorized by HTTP proxy");
82 response.setHeader("Proxy-Authenticate",
83 'Basic realm="' + realm + '"', false);
84+ if (metadata.hasHeader("X-Set-407-Cookie")) {
85+ response.setHeader("Set-Cookie", "chewy", false);
86+ }
87 body = "failed";
88 response.bodyOutputStream.write(body, body.length);
89 }
90--
912.1.2
92
diff --git a/gnu/packages/patches/icecat-CVE-2014-8641.patch b/gnu/packages/patches/icecat-CVE-2014-8641.patch
new file mode 100644
index 00000000000..ec42861945a
--- /dev/null
+++ b/gnu/packages/patches/icecat-CVE-2014-8641.patch
@@ -0,0 +1,29 @@
1From e36a3dd359ff0ac9c8796d41bedc884218d479e7 Mon Sep 17 00:00:00 2001
2From: Paul Adenot <paul@paul.cx>
3Date: Tue, 16 Dec 2014 18:45:40 +0100
4Subject: [PATCH] Bug 1108455. r=kinetik, a=sledru
5
6---
7 media/libcubeb/src/cubeb_wasapi.cpp | 6 ++----
8 1 file changed, 2 insertions(+), 4 deletions(-)
9
10diff --git a/media/libcubeb/src/cubeb_wasapi.cpp b/media/libcubeb/src/cubeb_wasapi.cpp
11index 135aa86..5387a4f 100644
12--- a/media/libcubeb/src/cubeb_wasapi.cpp
13+++ b/media/libcubeb/src/cubeb_wasapi.cpp
14@@ -365,10 +365,8 @@ wasapi_stream_render_loop(LPVOID stream)
15 assert(padding <= stm->buffer_frame_count);
16
17 if (stm->draining) {
18- if (padding == 0) {
19- stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_DRAINED);
20- is_playing = false;
21- }
22+ stm->state_callback(stm, stm->user_ptr, CUBEB_STATE_DRAINED);
23+ is_playing = false;
24 continue;
25 }
26
27--
282.1.2
29
diff --git a/gnu/packages/patches/icecat-armhf-xpcom.patch b/gnu/packages/patches/icecat-armhf-xpcom.patch
new file mode 100644
index 00000000000..e92c8bbf1ee
--- /dev/null
+++ b/gnu/packages/patches/icecat-armhf-xpcom.patch
@@ -0,0 +1,25 @@
1From 06198585dae1e4079b4b52b49827fd5b826030b7 Mon Sep 17 00:00:00 2001
2From: Douglas Crosher <dtc-moz@scieneer.com>
3Date: Sun, 16 Nov 2014 00:29:23 +1100
4Subject: [PATCH] Bug 1050258 - ARM hard-float XPCOM: correct argument passing.
5 r=mjrosenb, a=bkerensa
6
7---
8 xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp | 1 +
9 1 file changed, 1 insertion(+)
10
11diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
12index 946b7e3..c1c536b 100644
13--- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
14+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
15@@ -224,6 +224,7 @@ static inline void copy_dword(uint32_t* &ireg_args,
16 *(uint64_t *)ireg_args = data;
17 ireg_args += 2;
18 } else {
19+ ireg_args = end;
20 if ((uint32_t)stack_args & 4) {
21 stack_args++;
22 }
23--
242.1.2
25