From eed6707798b8a26a671be596b585221f233dd695 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 3 Jul 2024 17:52:50 +0200 Subject: [PATCH] znc: fix modtcl rce ZNC's modtcl fails to properly escape certain IRC events, which allows executing code within that ZNC instance, when the module is loaded. Fixes: CVE-2024-39844 --- pkgs/applications/networking/znc/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/znc/default.nix b/pkgs/applications/networking/znc/default.nix index 667533871993..35ac2e921c43 100644 --- a/pkgs/applications/networking/znc/default.nix +++ b/pkgs/applications/networking/znc/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openssl, pkg-config +{ lib, stdenv, fetchurl, fetchpatch2, openssl, pkg-config , withPerl ? false, perl , withPython ? false, python3 , withTcl ? false, tcl @@ -18,6 +18,14 @@ stdenv.mkDerivation rec { sha256 = "03fyi0j44zcanj1rsdx93hkdskwfvhbywjiwd17f9q1a7yp8l8zz"; }; + patches = [ + (fetchpatch2 { + name = "CVE-2024-39844.patch"; + url = "https://people.znc.in/~darthgandalf/dir/ymQgfvwiG54pPFqyv1U0pcvvj5PLz5.txt"; + hash = "sha256-+WPlErDI4AR3UZL3P8IitFop1MBEa97pro57pr0/TZw="; + }) + ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ]