Unverified Commit ecfb8679 authored by Thomas Gerbet's avatar Thomas Gerbet Committed by GitHub
Browse files

calibre: apply fix for CVE-2026-25731 and CVE-2026-25635 (#490066)

parents c9652b50 c2b957ed
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -61,6 +61,15 @@ stdenv.mkDerivation (finalAttrs: {
        url = "https://github.com/debian-calibre/calibre/raw/refs/tags/debian/${finalAttrs.version}+${debian-source}/debian/patches/hardening/0007-Hardening-Qt-code.patch";
        hash = "sha256-lKp/omNicSBiQUIK+6OOc8ysM6LImn5GxWhpXr4iX+U=";
      })
      # Fix CVE-2026-25635
      # http://tracker.security.nixos.org/issues/NIXPKGS-2026-0156
      # https://github.com/NixOS/nixpkgs/issues/488046
      # Fixed upstream in 9.2.0.
      (fetchpatch {
        name = "CVE-2026-25635.patch";
        url = "https://github.com/kovidgoyal/calibre/commit/9739232fcb029ac15dfe52ccd4fdb4a07ebb6ce9.patch";
        hash = "sha256-fzotxhfMF/DCMvpIfMSOGY8iVOybsYymRQvhXf7jQyc=";
      })
      # Fix CVE-2026-25636
      # http://tracker.security.nixos.org/issues/NIXPKGS-2026-0160
      # https://github.com/NixOS/nixpkgs/issues/488052
@@ -77,6 +86,15 @@ stdenv.mkDerivation (finalAttrs: {
        url = "https://github.com/kovidgoyal/calibre/commit/9484ea82c6ab226c18e6ca5aa000fa16de598726.patch";
        hash = "sha256-hpWFSQXyOAVRqou0v+5oT5zIrBbyP2Uv2z1Vg811ZG0=";
      })
      # Fix CVE-2026-25731
      # http://tracker.security.nixos.org/issues/NIXPKGS-2026-0155
      # https://github.com/NixOS/nixpkgs/issues/488045
      # Fixed upstream in 9.2.0.
      (fetchpatch {
        name = "CVE-2026-25731.patch";
        url = "https://github.com/kovidgoyal/calibre/commit/f0649b27512e987b95fcab2e1e0a3bcdafc23379.patch";
        hash = "sha256-G9H6hEN5cyFIqDmJZv+bgt+6ZF6/K2t9npYjksjcxTo=";
      })
    ]
    ++ lib.optional (!unrarSupport) ./dont_build_unrar_plugin.patch;