public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Sandro Mani <manisandro@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/mingw-cfitsio] f44: Backport fix for CVE-2026-115504
Date: Sun, 25 Oct 2026 11:58:42 GMT [thread overview]
Message-ID: <179292952242.1.2616428328945773635.rpms-mingw-cfitsio-8a21137bbdd3@fedoraproject.org> (raw)
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
next reply other threads:[~2026-10-25 11:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 11:58 Sandro Mani [this message]
2026-10-25 11:58 [rpms/mingw-cfitsio] f44: Backport fix for CVE-2026-115504 Sandro Mani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179292952242.1.2616428328945773635.rpms-mingw-cfitsio-8a21137bbdd3@fedoraproject.org \
--to=manisandro@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox