From fbfa7ea82dd27b19d56c9f505ff5a013e749a630 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Thu, 14 Apr 2022 23:18:11 +0100 Subject: [PATCH] mruby: add patch for CVE-2022-1212 --- pkgs/development/compilers/mruby/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/mruby/default.nix b/pkgs/development/compilers/mruby/default.nix index 4d046cd7f84f..6651df5a2f06 100644 --- a/pkgs/development/compilers/mruby/default.nix +++ b/pkgs/development/compilers/mruby/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, ruby, bison, rake, fetchFromGitHub }: +{ lib, stdenv, ruby, bison, rake, fetchFromGitHub, fetchpatch }: stdenv.mkDerivation rec { pname = "mruby"; @@ -11,6 +11,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-C3K7ZooaOMa+V2HjxwiKxrrMb7ffl4QAgPsftRtb60c="; }; + patches = [ + (fetchpatch { + name = "CVE-2022-1212.patch"; + url = "https://github.com/mruby/mruby/commit/3cf291f72224715942beaf8553e42ba8891ab3c6.patch"; + sha256 = "1bl8wm6v7v18zgxqvm4kbn8g97a75phzrdah279xqw1qvplbd2w7"; + }) + ]; + nativeBuildInputs = [ ruby bison rake ]; # Necessary so it uses `gcc` instead of `ld` for linking.