about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libvirt/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libvirt/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/libvirt/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libvirt/default.nix b/nixpkgs/pkgs/development/libraries/libvirt/default.nix
index 72d94ee32989..81dacdb493c9 100644
--- a/nixpkgs/pkgs/development/libraries/libvirt/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libvirt/default.nix
@@ -9,6 +9,7 @@
 , dnsmasq
 , docutils
 , fetchFromGitLab
+, fetchpatch
 , gettext
 , glib
 , gnutls
@@ -126,6 +127,16 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./0001-meson-patch-in-an-install-prefix-for-building-on-nix.patch
+    (fetchpatch {
+      name = "CVE-2024-2494.patch";
+      url = "https://gitlab.com/libvirt/libvirt/-/commit/8a3f8d957507c1f8223fdcf25a3ff885b15557f2.patch";
+      hash = "sha256-kxSIZ4bPOhN6PpJepoSF+EDTgdmazRWh3a3KSVfm1GU=";
+    })
+    (fetchpatch {
+      name = "CVE-2024-1441.patch";
+      url = "https://gitlab.com/libvirt/libvirt/-/commit/c664015fe3a7bf59db26686e9ed69af011c6ebb8.patch";
+      hash = "sha256-Qi/gk7+NPz9s9OpWOnF8XW6A75C9BbVxBTE4KVwalo4=";
+    })
   ] ++ lib.optionals enableZfs [
     (substituteAll {
       src = ./0002-substitute-zfs-and-zpool-commands.patch;
@@ -271,7 +282,7 @@ stdenv.mkDerivation rec {
       "--sysconfdir=/var/lib"
       (cfg "install_prefix" (placeholder "out"))
       (cfg "localstatedir" "/var")
-      (cfg "runstatedir" "/run")
+      (cfg "runstatedir" (if isDarwin then "/var/run" else "/run"))
 
       (cfg "init_script" (if isDarwin then "none" else "systemd"))
       (cfg "qemu_datadir" (lib.optionalString isDarwin "${qemu}/share/qemu"))