summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Palmquist <stig@stig.io>2022-06-08 15:57:41 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2022-06-08 22:26:11 +0000
commit58b0e70f6baf2e9450c11311e85ea39e2443bcd7 (patch)
treea9285d4a7dd6ce7160229daa98023d634fb95ce4
parentMerge pull request #176957 from NixOS/backport-176937-to-release-22.05 (diff)
downloadnixpkgs-origin/backport-176907-to-release-22.05.tar.gz
firejail: patches for CVE-2022-31214origin/backport-176907-to-release-22.05
https://seclists.org/oss-sec/2022/q2/188 (cherry picked from commit b31db15de008f0a8f5f62c5e477c69165d8458a1)
-rw-r--r--pkgs/os-specific/linux/firejail/default.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/firejail/default.nix b/pkgs/os-specific/linux/firejail/default.nix
index bbb3a1daab69..a8188caf18be 100644
--- a/pkgs/os-specific/linux/firejail/default.nix
+++ b/pkgs/os-specific/linux/firejail/default.nix
@@ -53,6 +53,29 @@ stdenv.mkDerivation rec {
# Upstream fix: https://github.com/netblue30/firejail/pull/5132
# Hopefully fixed upstream in version > 0.9.68
./fix-opengl-support.patch
+
+ # Fix CVE-2022-31214 by patching in 4 commits from upstream
+ # https://seclists.org/oss-sec/2022/q2/188
+ (fetchpatch {
+ name = "CVE-2022-31214-patch1"; # "fixing CVE-2022-31214"
+ url = "https://github.com/netblue30/firejail/commit/27cde3d7d1e4e16d4190932347c7151dc2a84c50.patch";
+ sha256 = "sha256-XXmnYCn4TPUvU43HifZDk4tEZQvOho9/7ehU6889nN4=";
+ })
+ (fetchpatch {
+ name = "CVE-2022-31214-patch2"; # "shutdown testing"
+ url = "https://github.com/netblue30/firejail/commit/04ff0edf74395ddcbbcec955279c74ed9a6c0f86.patch";
+ sha256 = "sha256-PV73hRlvYEQihuljSCQMNO34KJ0hDVFexhirpHcTK1I=";
+ })
+ (fetchpatch {
+ name = "CVE-2022-31214-patch3"; # "CVE-2022-31214: fixing the fix"
+ url = "https://github.com/netblue30/firejail/commit/dab835e7a0eb287822016f5ae4e87f46e1d363e7.patch";
+ sha256 = "sha256-6plBIliW/nLKR7TdGeB88eQ65JHEasnaRsP3HPXAFyA=";
+ })
+ (fetchpatch {
+ name = "CVE-2022-31214-patch4"; # "CVE-2022-31214: fixing the fix, one more time "
+ url = "https://github.com/netblue30/firejail/commit/1884ea22a90d225950d81c804f1771b42ae55f54.patch";
+ sha256 = "sha256-inkpcdC5rl5w+CTAwwQVBOELlHTXb8UGlpU+8kMY95s=";
+ })
];
prePatch = ''