Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package cmark-gfm for openSUSE:Factory 
checked in at 2026-11-21 21:47:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cmark-gfm (Old)
 and      /work/SRC/openSUSE:Factory/.cmark-gfm.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cmark-gfm"

Sat Nov 21 21:47:30 2026 rev:2 rq:1399606 version:0.29.0.gfm.14

Changes:
--------
--- /work/SRC/openSUSE:Factory/cmark-gfm/cmark-gfm.changes      2026-06-29 
17:31:23.968159755 +0200
+++ /work/SRC/openSUSE:Factory/.cmark-gfm.new.1340718/cmark-gfm.changes 
2026-11-21 21:49:34.178140197 +0100
@@ -1,0 +2,19 @@
+Sat Nov 21 07:07:57 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 0.29.0.gfm.14, verified as upstream tag published
+  2026-11-18:
+  * Fix use-after-free in footnote reference parsing
+    (GHSA-84x9-qqwv-3w4q)
+  * Fix unsigned pointer overflow in autolink validate_protocol
+  * Raise CMake minimum to 3.5
+- Rename lib subpackages with the versioned soname:
+  libcmark-gfm0_29_0_gfm_14 and
+  libcmark-gfm-extensions0_29_0_gfm_14
+- Rebase cmark-gfm-0.29.0.gfm.13-cmake4.patch: drop cmake-minimum
+  hunk adopted upstream, keep FindPython test switch
+- Fix %check 2/13 failures (extensions Example 25): copy raw
+  footnote label bytes into owned storage via
+  cmark-gfm-footnote-label.patch (upstream #403 fixed the UAF but
+  truncated labels at HTML inlines)
+
+-------------------------------------------------------------------

Old:
----
  cmark-gfm-0.29.0.gfm.13.tar.gz

New:
----
  cmark-gfm-0.29.0.gfm.14.tar.gz
  cmark-gfm-footnote-label.patch

----------(New B)----------
  New:  footnote label bytes into owned storage via
  cmark-gfm-footnote-label.patch (upstream #403 fixed the UAF but
  truncated labels at HTML inlines)
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cmark-gfm.spec ++++++
--- /var/tmp/diff_new_pack.68TELl/_old  2026-11-21 21:49:35.084178896 +0100
+++ /var/tmp/diff_new_pack.68TELl/_new  2026-11-21 21:49:35.086178981 +0100
@@ -17,26 +17,28 @@
 
 
 # Upstream bakes the full release string into the SONAME
-# (libcmark-gfm.so.0.29.0.gfm.13).  We keep parity with the upstream
+# (libcmark-gfm.so.0.29.0.gfm.14).  We keep parity with the upstream
 # soname (as Debian/Arch/Gentoo do).  Per the shared-library packaging
 # policy, the lib subpackage suffix reflects the FULL soname
-# (0_29_0_gfm_13), so that a future .gfm.NN soname bump renames the
+# (0_29_0_gfm_14), so that a future .gfm.NN soname bump renames the
 # package cleanly.  The alphabetic "gfm" component makes rpmlint's shlib
 # detector emit a spurious shlib-policy-missing-lib, which is filtered in
 # cmark-gfm.rpmlintrc.
-%define sover    0.29.0.gfm.13
-%define libcmark libcmark-gfm0_29_0_gfm_13
-%define libext   libcmark-gfm-extensions0_29_0_gfm_13
+%define sover    0.29.0.gfm.14
+%define libcmark libcmark-gfm0_29_0_gfm_14
+%define libext   libcmark-gfm-extensions0_29_0_gfm_14
 Name:           cmark-gfm
-Version:        0.29.0.gfm.13
+Version:        0.29.0.gfm.14
 Release:        0
 Summary:        GitHub's fork of cmark, a CommonMark parsing and rendering 
library
 License:        BSD-2-Clause AND MIT
 URL:            https://github.com/github/cmark-gfm
 Source:         
%{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 Source1:        %{name}.rpmlintrc
-# PATCH-FIX-UPSTREAM cmark-gfm-0.29.0.gfm.13-cmake4.patch 
gh#github/cmark-gfm#390 -- build with CMake 4 and switch the test suite to 
FindPython
-Patch0:         %{name}-%{version}-cmake4.patch
+# PATCH-FIX-UPSTREAM cmark-gfm-0.29.0.gfm.13-cmake4.patch 
gh#github/cmark-gfm#390 -- switch the test suite from removed FindPythonInterp 
to FindPython for CMake 4 (minimum part upstream in #383)
+Patch0:         cmark-gfm-0.29.0.gfm.13-cmake4.patch
+# PATCH-FIX-OPENSUSE cmark-gfm-footnote-label.patch -- copy raw footnote label 
bytes into owned storage; upstream #403 fixed the UAF but truncated labels at 
HTML/code inlines, breaking extensions Example 25
+Patch1:         cmark-gfm-footnote-label.patch
 BuildRequires:  cmake
 BuildRequires:  gcc
 BuildRequires:  gcc-c++

++++++ cmark-gfm-0.29.0.gfm.13-cmake4.patch ++++++
--- /var/tmp/diff_new_pack.68TELl/_old  2026-11-21 21:49:35.110180006 +0100
+++ /var/tmp/diff_new_pack.68TELl/_new  2026-11-21 21:49:35.113180134 +0100
@@ -1,16 +1,11 @@
-Update the CMake files to version 4
+Switch the test suite from removed FindPythonInterp to FindPython for CMake 4
 
+Upstream adopted the cmake-minimum part (3.0 -> 3.5) in
+https://github.com/github/cmark-gfm/pull/383, so only the test-suite
+part is carried here.
 Patch submitted upstream, along with other improvements:
 https://github.com/github/cmark-gfm/pull/390
 
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1,4 +1,4 @@
--cmake_minimum_required(VERSION 3.0)
-+cmake_minimum_required(VERSION 4.0)
- project(cmark-gfm)
- 
- set(PROJECT_VERSION_MAJOR 0)
 --- a/test/CMakeLists.txt
 +++ b/test/CMakeLists.txt
 @@ -4,9 +4,9 @@

++++++ cmark-gfm-0.29.0.gfm.13.tar.gz -> cmark-gfm-0.29.0.gfm.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmark-gfm-0.29.0.gfm.13/CMakeLists.txt 
new/cmark-gfm-0.29.0.gfm.14/CMakeLists.txt
--- old/cmark-gfm-0.29.0.gfm.13/CMakeLists.txt  2023-07-21 17:19:43.000000000 
+0200
+++ new/cmark-gfm-0.29.0.gfm.14/CMakeLists.txt  2026-11-18 19:30:01.000000000 
+0100
@@ -1,10 +1,10 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
 project(cmark-gfm)
 
 set(PROJECT_VERSION_MAJOR 0)
 set(PROJECT_VERSION_MINOR 29)
 set(PROJECT_VERSION_PATCH 0)
-set(PROJECT_VERSION_GFM 13)
+set(PROJECT_VERSION_GFM 14)
 set(PROJECT_VERSION 
${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.gfm.${PROJECT_VERSION_GFM})
 
 include("FindAsan.cmake")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmark-gfm-0.29.0.gfm.13/changelog.txt 
new/cmark-gfm-0.29.0.gfm.14/changelog.txt
--- old/cmark-gfm-0.29.0.gfm.13/changelog.txt   2023-07-21 17:19:43.000000000 
+0200
+++ new/cmark-gfm-0.29.0.gfm.14/changelog.txt   2026-11-18 19:30:01.000000000 
+0100
@@ -1,3 +1,6 @@
+[0.29.0.gfm.14]
+  * Fix use-after-free in inline footnote reference parsing: 
https://github.com/github/cmark-gfm/security/advisories/GHSA-84x9-qqwv-3w4q
+
 [0.29.0.gfm.13]
   * Normalized marker row vs. delimiter row nomenclature (#273)
   * Exposed CMARK_NODE_FOOTNOTE_DEFINITION literal value (#336)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmark-gfm-0.29.0.gfm.13/extensions/autolink.c 
new/cmark-gfm-0.29.0.gfm.14/extensions/autolink.c
--- old/cmark-gfm-0.29.0.gfm.13/extensions/autolink.c   2023-07-21 
17:19:43.000000000 +0200
+++ new/cmark-gfm-0.29.0.gfm.14/extensions/autolink.c   2026-11-18 
19:30:01.000000000 +0100
@@ -312,7 +312,10 @@
     return true;
   }
 
-  char prev_char = data[-((ptrdiff_t)rewind) - len - 1];
+  // Compute the offset as a signed value: with size_t operands the index
+  // becomes a huge unsigned number and adding it to `data` wraps the pointer,
+  // which is undefined behaviour even though the address computed is in 
bounds.
+  char prev_char = data[-((ptrdiff_t)(rewind + len + 1))];
 
   // Make sure the character before the protocol is non-alphanumeric
   return !cmark_isalnum(prev_char);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cmark-gfm-0.29.0.gfm.13/src/inlines.c 
new/cmark-gfm-0.29.0.gfm.14/src/inlines.c
--- old/cmark-gfm-0.29.0.gfm.13/src/inlines.c   2023-07-21 17:19:43.000000000 
+0200
+++ new/cmark-gfm-0.29.0.gfm.14/src/inlines.c   2026-11-18 19:30:01.000000000 
+0100
@@ -1255,31 +1255,24 @@
 
       cmark_node *fnref = make_simple(subj->mem, 
CMARK_NODE_FOOTNOTE_REFERENCE);
 
-      // the start and end of the footnote ref is the opening and closing brace
-      // i.e. the subject's current position, and the opener's start_column
-      int fnref_end_column = subj->pos + subj->column_offset + 
subj->block_offset;
-      int fnref_start_column = opener->inl_text->start_column;
-
-      // any given node delineates a substring of the line being processed,
-      // with the remainder of the line being pointed to thru its 'literal'
-      // struct member.
-      // here, we copy the literal's pointer, moving it past the '^' character
-      // for a length equal to the size of footnote reference text.
-      // i.e. end_col minus start_col, minus the [ and the ^ characters
-      //
-      // this copies the footnote reference string, even if between the
-      // `opener` and the subject's current position there are other nodes
-      //
-      // (first, check for underflows)
-      if ((fnref_start_column + 2) <= fnref_end_column) {
-        fnref->as.literal = cmark_chunk_dup(literal, 1, (fnref_end_column - 
fnref_start_column) - 2);
-      } else {
-        fnref->as.literal = cmark_chunk_dup(literal, 1, 0);
+      // Sometimes, the footnote reference text gets parsed into multiple nodes
+      // (see longer comment below). Therefore, we iterate through the nodes,
+      // copying the text fragments into a new string buffer named `fnref_buf`.
+      cmark_strbuf fnref_buf = CMARK_BUF_INIT(subj->mem);
+      cmark_node *current_node = opener->inl_text->next;
+      fnref->start_line = current_node->start_line;
+      fnref->start_column = current_node->start_column;
+      // Don't copy the first character, which is '^'.
+      cmark_strbuf_put(&fnref_buf, literal->data + 1, literal->len - 1);
+      cmark_node *next_node = current_node->next;
+      while (next_node && next_node->type == CMARK_NODE_TEXT) {
+        current_node = next_node;
+        cmark_strbuf_put(&fnref_buf, current_node->as.literal.data, 
current_node->as.literal.len);
+        next_node = current_node->next;
       }
-
-      fnref->start_line = fnref->end_line = subj->line;
-      fnref->start_column = fnref_start_column;
-      fnref->end_column = fnref_end_column;
+      fnref->end_line = current_node->end_line;
+      fnref->end_column = current_node->end_column;
+      fnref->as.literal = cmark_chunk_buf_detach(&fnref_buf);
 
       // we then replace the opener with this new fnref node, the net effect
       // being replacing the opening '[' text node with a `^footnote-ref]` 
node.
@@ -1299,8 +1292,7 @@
       // the opener->inl_text->next.
       //
       // therefore, here we walk thru the list and free them all up
-      cmark_node *next_node;
-      cmark_node *current_node = opener->inl_text->next;
+      current_node = opener->inl_text->next;
       while(current_node) {
         next_node = current_node->next;
         cmark_node_free(current_node);

++++++ cmark-gfm-footnote-label.patch ++++++
Copy footnote reference labels from the raw source slice instead of
rebuilding them from decoded inline nodes.  Upstream 0.29.0.gfm.14
(PR github/cmark-gfm#403, GHSA-84x9-qqwv-3w4q) fixed the
use-after-free by allocating a fresh buffer, but it concatenates only
CMARK_NODE_TEXT fragments.  Any HTML/code inline inside the label
(e.g. the "<script>" in test/extensions.txt Example 25 "Footnote
reference labels are href escaped") truncates the label, while footnote
definitions keep the raw bytes (src/blocks.c scan_footnote_definition),
so the reference no longer matches and %check fails 2/13
(extensions_executable, roundtrip_extensions_executable) with literal
"Hello[^...]" output.  Copying byte offsets opener->position..initial_pos
from subj->input into owned storage preserves the UAF fix, matches the
definition handling, and restores bracket-inclusive source ranges.

--- a/src/inlines.c
+++ b/src/inlines.c
@@ -1255,24 +1255,49 @@
 
       cmark_node *fnref = make_simple(subj->mem, 
CMARK_NODE_FOOTNOTE_REFERENCE);
 
-      // Sometimes, the footnote reference text gets parsed into multiple nodes
-      // (see longer comment below). Therefore, we iterate through the nodes,
-      // copying the text fragments into a new string buffer named `fnref_buf`.
+      // Footnote definitions keep the raw label bytes (src/blocks.c:
+      // scan_footnote_definition + cmark_chunk_dup, no decoding).  Copy
+      // the raw source slice between "[^" and "]" into owned storage so
+      // the reference matches the definition byte for byte and cannot
+      // dangle (GHSA-84x9-qqwv-3w4q).  Do not rebuild from decoded
+      // inline nodes: that truncates at HTML/code inlines and alters
+      // entities/escapes, breaking test/extensions.txt Example 25.
+      // opener->position is just after "[", initial_pos just after "]".
       cmark_strbuf fnref_buf = CMARK_BUF_INIT(subj->mem);
-      cmark_node *current_node = opener->inl_text->next;
-      fnref->start_line = current_node->start_line;
-      fnref->start_column = current_node->start_column;
-      // Don't copy the first character, which is '^'.
-      cmark_strbuf_put(&fnref_buf, literal->data + 1, literal->len - 1);
-      cmark_node *next_node = current_node->next;
-      while (next_node && next_node->type == CMARK_NODE_TEXT) {
-        current_node = next_node;
-        cmark_strbuf_put(&fnref_buf, current_node->as.literal.data, 
current_node->as.literal.len);
-        next_node = current_node->next;
+      // The caret marker is normally one byte "^", but may appear
+      // escaped ("\\^") or as an entity ("&#94;", "&#x5e;", ...) which
+      // still decodes to "^" above.  Skip exactly that marker.
+      bufsize_t caret_len = 1;
+      if (opener->position < subj->input.len) {
+        unsigned char c0 = subj->input.data[opener->position];
+        if (c0 == '^') {
+          caret_len = 1;
+        } else if (c0 == '\\' && opener->position + 1 < subj->input.len &&
+                   subj->input.data[opener->position + 1] == '^') {
+          caret_len = 2;
+        } else if (c0 == '&') {
+          bufsize_t i = opener->position;
+          while (i < subj->input.len && i < opener->position + 32 &&
+                 subj->input.data[i] != ';') {
+            i++;
+          }
+          if (i < subj->input.len && subj->input.data[i] == ';') {
+            caret_len = i - opener->position + 1;
+          }
+        }
+      }
+      bufsize_t label_start = opener->position + caret_len;
+      bufsize_t label_end = initial_pos - 1;
+      if (label_end > label_start) {
+        cmark_strbuf_put(&fnref_buf, subj->input.data + label_start,
+                         label_end - label_start);
       }
-      fnref->end_line = current_node->end_line;
-      fnref->end_column = current_node->end_column;
       fnref->as.literal = cmark_chunk_buf_detach(&fnref_buf);
+      fnref->start_line = fnref->end_line = subj->line;
+      fnref->start_column = opener->inl_text->start_column;
+      fnref->end_column = subj->pos + subj->column_offset + subj->block_offset;
+      cmark_node *current_node = opener->inl_text->next;
+      cmark_node *next_node;
 
       // we then replace the opener with this new fnref node, the net effect
       // being replacing the opening '[' text node with a `^footnote-ref]` 
node.

++++++ cmark-gfm.rpmlintrc ++++++
--- /var/tmp/diff_new_pack.68TELl/_old  2026-11-21 21:49:35.238185474 +0100
+++ /var/tmp/diff_new_pack.68TELl/_new  2026-11-21 21:49:35.241185602 +0100
@@ -1,5 +1,5 @@
 # Upstream bakes the full release string into the SONAME, so the shared
-# libraries carry libcmark-gfm.so.0.29.0.gfm.13 / 
libcmark-gfm-extensions.so.0.29.0.gfm.13.
+# libraries carry libcmark-gfm.so.0.29.0.gfm.14 / 
libcmark-gfm-extensions.so.0.29.0.gfm.14.
 # The alphabetic "gfm" component is not a numeric ELF soname version, so
 # rpmlint's shared-library detector fails to recognise the file as a
 # versioned library and spuriously reports shlib-policy-missing-lib for

Reply via email to