Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.05] cups: fix socket-only usage after CVE-2024-35235 #337748

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 0 additions & 86 deletions pkgs/misc/cups/2.4.8-CVE-2024-35235.patch

This file was deleted.

24 changes: 23 additions & 1 deletion pkgs/misc/cups/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
, libpaper ? null
, coreutils
, nixosTests
, fetchpatch
}:

stdenv.mkDerivation rec {
Expand All @@ -33,7 +34,28 @@ stdenv.mkDerivation rec {
outputs = [ "out" "lib" "dev" "man" ];

patches = [
./2.4.8-CVE-2024-35235.patch
(fetchpatch {
name = "CVE-2024-35235.patch";
url = "https://github.com/OpenPrinting/cups/commit/b273a1f29bda87317c551614cf9ab6125f56e317.patch";
hash = "sha256-nzWKEMOEBKZMjqVPl2mcATtXZSrh++yhv9VMvbA+49E=";
})
# the following three patches fix a regression introduced by the patch above
(fetchpatch {
name = "CVE-2024-35235-fixup-domainsocket-1.patch";
url = "https://github.com/OpenPrinting/cups/commit/6131f6a73c188f3db0ec94ae488991ce80cfd7ea.patch";
hash = "sha256-uftOI0zkwPXsW8CY8BoOkx4BysjDUc66LuzyZDjUHCI=";
})
(fetchpatch {
name = "CVE-2024-35235-fixup-domainsocket-2.patch";
url = "https://github.com/OpenPrinting/cups/commit/4417cd366f7baf64f4ada3efbb3ec13cd773a0f4.patch";
hash = "sha256-ighA4Vmf43iiwkNl71//Ml8ynh8nF/bcNOKELeJFPKo=";
})
(fetchpatch {
name = "CVE-2024-35235-fixup-domainsocket-3.patch";
url = "https://github.com/OpenPrinting/cups/commit/145b946a86062aafab76c656ee9c1112bfd4f804.patch";
includes = [ "scheduler/conf.c" ];
hash = "sha256-2jQFHUFav8XDfqA/PVKNvbUnZI34na8Wbuu4XRy3uqc=";
})
];

postPatch = ''
Expand Down