From fd03298cd3d4cac0030f27d554005f8e521b7908 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Wed, 30 Nov 2022 22:32:45 +0000 Subject: [PATCH 1/2] mujs: add patch for CVE-2022-44789 --- pkgs/development/interpreters/mujs/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/mujs/default.nix b/pkgs/development/interpreters/mujs/default.nix index 062647416b15..72f6ec3b15a7 100644 --- a/pkgs/development/interpreters/mujs/default.nix +++ b/pkgs/development/interpreters/mujs/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, readline }: +{ lib, stdenv, fetchurl, readline, fetchpatch }: stdenv.mkDerivation rec { pname = "mujs"; @@ -9,6 +9,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-ZpdtHgajUnVKI0Kvc9Guy7U8x82uK2jNoBO33c+SMjM="; }; + patches = [ + (fetchpatch { + name = "CVE-2022-44789.patch"; + url = "https://git.ghostscript.com/?p=mujs.git;a=patch;h=edb50ad66f7601ca9a3544a0e9045e8a8c60561f"; + sha256 = "sha256-KHBJlDchrXTmN5vEuyQ+saX12F5hyUlJFguiDsZkGqc="; + }) + ]; + buildInputs = [ readline ]; makeFlags = [ "prefix=$(out)" ]; From faf60907d8d1acb1864622a66ec305d794a57312 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Thu, 1 Dec 2022 21:30:03 +0000 Subject: [PATCH 2/2] mujs: add patch for unannounced stack overflow --- pkgs/development/interpreters/mujs/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/interpreters/mujs/default.nix b/pkgs/development/interpreters/mujs/default.nix index 72f6ec3b15a7..3afcd801250d 100644 --- a/pkgs/development/interpreters/mujs/default.nix +++ b/pkgs/development/interpreters/mujs/default.nix @@ -15,6 +15,11 @@ stdenv.mkDerivation rec { url = "https://git.ghostscript.com/?p=mujs.git;a=patch;h=edb50ad66f7601ca9a3544a0e9045e8a8c60561f"; sha256 = "sha256-KHBJlDchrXTmN5vEuyQ+saX12F5hyUlJFguiDsZkGqc="; }) + (fetchpatch { + name = "regex-compilation-stack-overflow.patch"; + url = "https://git.ghostscript.com/?p=mujs.git;a=patch;h=160ae29578054dc09fd91e5401ef040d52797e61"; + sha256 = "sha256-R0gTPj10fKtHbVe5RM6HNL772hVl9rXylkPw5qQWt0w="; + }) ]; buildInputs = [ readline ];