From f40c84b14956cbbfd4da8503a9bf33c1495de4ca Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 12 Aug 2023 15:34:46 +0100 Subject: [PATCH 1/2] libraw: add patch for CVE-2023-1729 --- pkgs/development/libraries/libraw/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libraw/default.nix b/pkgs/development/libraries/libraw/default.nix index 26d7616ba8f0..bec526af8c1f 100644 --- a/pkgs/development/libraries/libraw/default.nix +++ b/pkgs/development/libraries/libraw/default.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, lcms2, pkg-config }: +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, autoreconfHook +, lcms2 +, pkg-config +}: stdenv.mkDerivation rec { pname = "libraw"; @@ -11,6 +18,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-K9mULf6V/TCl5Vu4iuIdSGF9HzQlgNQLRFHIpNbmAlY"; }; + patches = [ + (fetchpatch { + name = "CVE-2023-1729.patch"; + url = "https://github.com/LibRaw/LibRaw/commit/9ab70f6dca19229cb5caad7cc31af4e7501bac93.patch"; + hash = "sha256-OAyqphxvtSM15NI77HwtGTmTmP9YNu3xhZ6D1CceJ7I="; + }) + ]; + outputs = [ "out" "lib" "dev" "doc" ]; propagatedBuildInputs = [ lcms2 ]; From 39070fdc9b861e776407a06546fcd77cfa842889 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 12 Aug 2023 15:35:04 +0100 Subject: [PATCH 2/2] libraw: add some key reverse dependencies to passthru.tests --- pkgs/development/libraries/libraw/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/development/libraries/libraw/default.nix b/pkgs/development/libraries/libraw/default.nix index bec526af8c1f..b03be435aac5 100644 --- a/pkgs/development/libraries/libraw/default.nix +++ b/pkgs/development/libraries/libraw/default.nix @@ -5,6 +5,13 @@ , autoreconfHook , lcms2 , pkg-config + +# for passthru.tests +, deepin +, freeimage +, hdrmerge +, imagemagick +, python3 }: stdenv.mkDerivation rec { @@ -34,6 +41,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru.tests = { + inherit imagemagick hdrmerge freeimage; + inherit (deepin) deepin-image-viewer; + inherit (python3.pkgs) rawkit; + }; + meta = with lib; { description = "Library for reading RAW files obtained from digital photo cameras (CRW/CR2, NEF, RAF, DNG, and others)"; homepage = "https://www.libraw.org/";