public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mingw-cfitsio] f44: Backport fix for CVE-2026-115504
@ 2026-10-25 11:58 Sandro Mani
  0 siblings, 0 replies; 2+ messages in thread
From: Sandro Mani @ 2026-10-25 11:58 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/mingw-cfitsio
Branch : f44
Commit : 8a21137bbdd3f3d1e8b9c7da9583c273f3879ac7
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2026-10-25T12:18:38+01:00
Stats  : +82/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/mingw-cfitsio/c/8a21137bbdd3f3d1e8b9c7da9583c273f3879ac7?branch=f44

Log:
Backport fix for CVE-2026-115504

---
diff --git a/579792e0f85bff0c6733ad5ebdf54c3b5c188686.patch b/579792e0f85bff0c6733ad5ebdf54c3b5c188686.patch
new file mode 100644
index 0000000..420ef8a
--- /dev/null
+++ b/579792e0f85bff0c6733ad5ebdf54c3b5c188686.patch
@@ -0,0 +1,80 @@
+diff -rupN cfitsio-4.7.0/getcols.c cfitsio-4.7.0-new/getcols.c
+--- cfitsio-4.7.0/getcols.c	2026-08-05 16:41:02.000000000 +0200
++++ cfitsio-4.7.0-new/getcols.c	2026-10-25 11:48:54.884853770 +0100
+@@ -914,6 +914,16 @@ int ffgcls2 ( fitsfile *fptr,   /* I - F
+       readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre);
+       ffmbyt(fptr, readptr, REPORT_EOF, status);  /* move to read position */
+ 
++      if (twidth < 1 || ntodo < 1 ||
++          (size_t) ntodo > sizeof(cbuff) / (size_t) twidth)
++      {
++         snprintf(message, FLEN_ERRMSG,
++                "Out-of-bounds string read: %ld strings of width %ld (ffgcls2)",
++                ntodo, twidth);
++         ffpmsg(message);
++         return(*status = READ_ERROR);
++      }
++
+       /* read the array of strings from the FITS file into the buffer */
+ 
+       if (incre == twidth)
+@@ -995,4 +1005,3 @@ int ffgcls2 ( fitsfile *fptr,   /* I - F
+ 
+     return(*status);
+ }
+-
+diff -rupN cfitsio-4.7.0/tests/test_getcols.c cfitsio-4.7.0-new/tests/test_getcols.c
+--- cfitsio-4.7.0/tests/test_getcols.c	2026-08-05 16:41:02.000000000 +0200
++++ cfitsio-4.7.0-new/tests/test_getcols.c	2026-10-25 11:48:54.885223463 +0100
+@@ -122,6 +122,43 @@ test_read_variable_length_string(void)
+ }
+ 
+ static void
++test_read_oversized_variable_length_string(void)
++{
++	fitsfile *f;
++	int status = 0;
++	char *ttype[] = { "VARSTR" };
++	char *tform[] = { "1PA" };
++	unsigned char *data;
++	char *result;
++	char *results[1];
++	int anynull;
++	size_t ii;
++
++	data = malloc(28801);
++	result = malloc(28802);
++	fail_if(data == NULL || result == NULL);
++	for (ii = 0; ii < 28801; ii++)
++		data[ii] = 'A';
++	results[0] = result;
++
++	call_02(ffinit, &f, "!" test_path);
++	call_04(ffphps, f, BYTE_IMG, 0, NULL);
++	call_08(ffcrtb, f, BINARY_TBL, 1, 1, ttype, tform, NULL, NULL);
++	call_06(ffpclb, f, 1, 1, 1, 28801, data);
++	call_01(ffclos, f);
++
++	call_03(ffopen, &f, test_path, READONLY);
++	call_03(ffmahd, f, 2, NULL);
++	ffgcvs(f, 1, 1, 1, 1, NULL, results, &anynull, &status);
++	fail_if(status == 0);
++	status = 0;
++	call_01(ffclos, f);
++
++	free(data);
++	free(result);
++}
++
++static void
+ test_read_numeric_as_string(void)
+ {
+ 	fitsfile *f;
+@@ -451,6 +488,7 @@ main(void)
+ 	test_read_short_as_string();
+ 	test_read_string_column_with_null_flags();
+ 	test_read_longlong_as_string();
++	test_read_oversized_variable_length_string();
+ 	test_get_column_display_width();
+ 	test_get_column_display_width_with_tdisp();
+ 	test_get_column_display_width_bad_col();

diff --git a/mingw-cfitsio.spec b/mingw-cfitsio.spec
index c40ec0b..c016f46 100644
--- a/mingw-cfitsio.spec
+++ b/mingw-cfitsio.spec
@@ -14,6 +14,8 @@ URL:           https://heasarc.gsfc.nasa.gov/fitsio/
 Source0:       https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/%{pkgname}-%{version}.tar.gz
 # Install headers to include/cfitsio
 Patch0:        cfitsio_cmake.patch
+# Backport fix for CVE-2026-115504
+Patch1:        https://github.com/HEASARC/cfitsio/commit/579792e0f85bff0c6733ad5ebdf54c3b5c188686.patch
 
 BuildRequires: make
 BuildRequires: cmake

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [rpms/mingw-cfitsio] f44: Backport fix for CVE-2026-115504
@ 2026-10-25 11:58 Sandro Mani
  0 siblings, 0 replies; 2+ messages in thread
From: Sandro Mani @ 2026-10-25 11:58 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/mingw-cfitsio
Branch : f44
Commit : bc2bce75fa2797a2c5128ae94c841cf8fe28feb1
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2026-10-25T12:57:09+01:00
Stats  : +10/-62 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/mingw-cfitsio/c/bc2bce75fa2797a2c5128ae94c841cf8fe28feb1?branch=f44

Log:
Backport fix for CVE-2026-115504

---
diff --git a/579792e0f85bff0c6733ad5ebdf54c3b5c188686.patch b/579792e0f85bff0c6733ad5ebdf54c3b5c188686.patch
index 420ef8a..518b31a 100644
--- a/579792e0f85bff0c6733ad5ebdf54c3b5c188686.patch
+++ b/579792e0f85bff0c6733ad5ebdf54c3b5c188686.patch
@@ -1,7 +1,7 @@
-diff -rupN cfitsio-4.7.0/getcols.c cfitsio-4.7.0-new/getcols.c
---- cfitsio-4.7.0/getcols.c	2026-08-05 16:41:02.000000000 +0200
-+++ cfitsio-4.7.0-new/getcols.c	2026-10-25 11:48:54.884853770 +0100
-@@ -914,6 +914,16 @@ int ffgcls2 ( fitsfile *fptr,   /* I - F
+diff -rupN cfitsio-4.6.4/getcols.c cfitsio-4.6.4-new/getcols.c
+--- cfitsio-4.6.4/getcols.c	2026-04-27 21:00:54.000000000 +0200
++++ cfitsio-4.6.4-new/getcols.c	2026-10-25 12:22:20.781111549 +0100
+@@ -908,6 +908,16 @@ int ffgcls2 ( fitsfile *fptr,   /* I - F
        readptr = startpos + ((LONGLONG)rownum * rowlen) + (elemnum * incre);
        ffmbyt(fptr, readptr, REPORT_EOF, status);  /* move to read position */
  
@@ -18,63 +18,8 @@ diff -rupN cfitsio-4.7.0/getcols.c cfitsio-4.7.0-new/getcols.c
        /* read the array of strings from the FITS file into the buffer */
  
        if (incre == twidth)
-@@ -995,4 +1005,3 @@ int ffgcls2 ( fitsfile *fptr,   /* I - F
+@@ -989,4 +999,3 @@ int ffgcls2 ( fitsfile *fptr,   /* I - F
  
      return(*status);
  }
 -
-diff -rupN cfitsio-4.7.0/tests/test_getcols.c cfitsio-4.7.0-new/tests/test_getcols.c
---- cfitsio-4.7.0/tests/test_getcols.c	2026-08-05 16:41:02.000000000 +0200
-+++ cfitsio-4.7.0-new/tests/test_getcols.c	2026-10-25 11:48:54.885223463 +0100
-@@ -122,6 +122,43 @@ test_read_variable_length_string(void)
- }
- 
- static void
-+test_read_oversized_variable_length_string(void)
-+{
-+	fitsfile *f;
-+	int status = 0;
-+	char *ttype[] = { "VARSTR" };
-+	char *tform[] = { "1PA" };
-+	unsigned char *data;
-+	char *result;
-+	char *results[1];
-+	int anynull;
-+	size_t ii;
-+
-+	data = malloc(28801);
-+	result = malloc(28802);
-+	fail_if(data == NULL || result == NULL);
-+	for (ii = 0; ii < 28801; ii++)
-+		data[ii] = 'A';
-+	results[0] = result;
-+
-+	call_02(ffinit, &f, "!" test_path);
-+	call_04(ffphps, f, BYTE_IMG, 0, NULL);
-+	call_08(ffcrtb, f, BINARY_TBL, 1, 1, ttype, tform, NULL, NULL);
-+	call_06(ffpclb, f, 1, 1, 1, 28801, data);
-+	call_01(ffclos, f);
-+
-+	call_03(ffopen, &f, test_path, READONLY);
-+	call_03(ffmahd, f, 2, NULL);
-+	ffgcvs(f, 1, 1, 1, 1, NULL, results, &anynull, &status);
-+	fail_if(status == 0);
-+	status = 0;
-+	call_01(ffclos, f);
-+
-+	free(data);
-+	free(result);
-+}
-+
-+static void
- test_read_numeric_as_string(void)
- {
- 	fitsfile *f;
-@@ -451,6 +488,7 @@ main(void)
- 	test_read_short_as_string();
- 	test_read_string_column_with_null_flags();
- 	test_read_longlong_as_string();
-+	test_read_oversized_variable_length_string();
- 	test_get_column_display_width();
- 	test_get_column_display_width_with_tdisp();
- 	test_get_column_display_width_bad_col();

diff --git a/cfitsio_cmake.patch b/cfitsio_cmake.patch
index e63b41c..e84e082 100644
--- a/cfitsio_cmake.patch
+++ b/cfitsio_cmake.patch
@@ -1,6 +1,6 @@
 diff -rupN --no-dereference cfitsio-4.6.4/CMakeLists.txt cfitsio-4.6.4-new/CMakeLists.txt
 --- cfitsio-4.6.4/CMakeLists.txt	2026-04-27 21:00:54.000000000 +0200
-+++ cfitsio-4.6.4-new/CMakeLists.txt	2026-05-04 00:07:18.555643605 +0200
++++ cfitsio-4.6.4-new/CMakeLists.txt	2026-10-25 12:22:20.743544840 +0100
 @@ -301,7 +301,7 @@ install(TARGETS cfitsio EXPORT cfitsioTa
  )
  

diff --git a/mingw-cfitsio.spec b/mingw-cfitsio.spec
index c016f46..655b7a5 100644
--- a/mingw-cfitsio.spec
+++ b/mingw-cfitsio.spec
@@ -5,7 +5,7 @@
 Name:          mingw-%{pkgname}
 # NOTE: sync SOVER in cfitsio_build.patch with the one in configure.in
 Version:       4.6.4
-Release:       2%{?dist}
+Release:       3%{?dist}
 Summary:       MinGW Windows CFITSIO library
 
 License:       CFITSIO
@@ -112,6 +112,9 @@ MinGW Windows CFITSIO library.
 %{mingw64_bindir}/speed.exe
 
 %changelog
+* Sun Oct 25 2026 Sandro Mani <manisandro@gmail.com> - 4.6.4-3
+- Backport fix for CVE-2026-115504
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.4-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-25 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 11:58 [rpms/mingw-cfitsio] f44: Backport fix for CVE-2026-115504 Sandro Mani
2026-10-25 11:58 Sandro Mani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox