diff --git a/backport-CVE-2025-7462 b/backport-CVE-2025-7462 new file mode 100644 index 0000000000000000000000000000000000000000..3f73c12bd4f724fc53db9df7415c298dfb1fe069 --- /dev/null +++ b/backport-CVE-2025-7462 @@ -0,0 +1,35 @@ +diff --git a/devices/vector/gdevpdf.c b/devices/vector/gdevpdf.c +index e75f33a6c..d7d5e8c6b 100644 +--- a/devices/vector/gdevpdf.c ++++ b/devices/vector/gdevpdf.c +@@ -946,15 +946,24 @@ + static int + pdf_ferror(gx_device_pdf *pdev) + { +- gp_fflush(pdev->file); ++ int code = 0; ++ ++ if (pdev->file != NULL) { ++ gp_fflush(pdev->file); ++ code = gp_ferror(pdev->file); ++ } + gp_fflush(pdev->xref.file); +- sflush(pdev->strm); +- sflush(pdev->asides.strm); +- sflush(pdev->streams.strm); +- sflush(pdev->pictures.strm); ++ if (pdev->strm->file != NULL) ++ sflush(pdev->strm); ++ if (pdev->asides.strm->file != NULL) ++ sflush(pdev->asides.strm); ++ if (pdev->streams.strm->file != NULL) ++ sflush(pdev->streams.strm); ++ if (pdev->pictures.strm->file != NULL) ++ sflush(pdev->pictures.strm); + return gp_ferror(pdev->file) || gp_ferror(pdev->xref.file) || + gp_ferror(pdev->asides.file) || gp_ferror(pdev->streams.file) || +- gp_ferror(pdev->pictures.file); ++ gp_ferror(pdev->pictures.file) || code; + } + + /* Compute the dominant text orientation of a page. */ diff --git a/ghostscript.spec b/ghostscript.spec index bbfe9ada306dea72b0c3e066f745c40e7e4cb229..8b9bcfefcc7d2e907d22668ab30a0bd9ddb1744b 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -9,7 +9,7 @@ Name: ghostscript Version: 9.55.0 -Release: 21 +Release: 22 Summary: An interpreter for PostScript and PDF files License: AGPLv3+ URL: https://ghostscript.com/ @@ -56,6 +56,7 @@ Patch29: backport-CVE-2025-27835.patch Patch30: backport-CVE-2025-27836.patch Patch40: Add-CJK-Chinese-font-mappings.patch Patch41: backport-CVE-2025-48708.patch +Patch42: backport-CVE-2025-7462.patch BuildRequires: automake gcc BuildRequires: adobe-mappings-cmap-devel adobe-mappings-pdf-devel @@ -216,6 +217,12 @@ install -m 0755 -d %{buildroot}%{_datadir}/%{name}/conf.d/ %{_bindir}/dvipdf %changelog +* Sun Sep 28 2025 Caohongtao - 9.55.0-22 +- Type:CVE +- ID:NA +- SUG:NA +- DECS: Fix CVE-2025-7462 + * Fri May 23 2025 Funda Wang - 9.55.0-21 - Type:CVE - ID:NA