public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mingw-qt5-qtwebkit] f43: Backport fix for CVE-2026-111497
@ 2026-10-31 15:36 Sandro Mani
  0 siblings, 0 replies; only message in thread
From: Sandro Mani @ 2026-10-31 15:36 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/mingw-qt5-qtwebkit
Branch : f43
Commit : 318cfa31bc974a790a6dafdb4cbb7e9da8f793e2
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2026-10-25T23:24:26+01:00
Stats  : +236/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/mingw-qt5-qtwebkit/c/318cfa31bc974a790a6dafdb4cbb7e9da8f793e2?branch=f43

Log:
Backport fix for CVE-2026-111497

---
diff --git a/CVE-2026-111497.patch b/CVE-2026-111497.patch
new file mode 100644
index 0000000..8e492b3
--- /dev/null
+++ b/CVE-2026-111497.patch
@@ -0,0 +1,229 @@
+diff -rupN --no-dereference qtwebkit-5.212.0-alpha4/Source/ThirdParty/brotli/dec/decode.c qtwebkit-5.212.0-alpha4-new/Source/ThirdParty/brotli/dec/decode.c
+--- qtwebkit-5.212.0-alpha4/Source/ThirdParty/brotli/dec/decode.c	2020-03-04 18:16:37.000000000 +0100
++++ qtwebkit-5.212.0-alpha4-new/Source/ThirdParty/brotli/dec/decode.c	2026-10-25 23:06:31.867284159 +0100
+@@ -1056,7 +1056,7 @@ static BrotliDecoderErrorCode DecodeCont
+ 
+ /* Decodes a command or literal and updates block type ring-buffer.
+    Reads 3..54 bits. */
+-static BROTLI_INLINE BROTLI_BOOL DecodeBlockTypeAndLength(
++static BROTLI_INLINE BrotliDecoderErrorCode DecodeBlockTypeAndLength(
+     int safe, BrotliDecoderState* s, int tree_type) {
+   uint32_t max_block_type = s->num_block_types[tree_type];
+   const HuffmanCode* type_tree = &s->block_type_trees[
+@@ -1066,6 +1066,9 @@ static BROTLI_INLINE BROTLI_BOOL DecodeB
+   BrotliBitReader* br = &s->br;
+   uint32_t* ringbuffer = &s->block_type_rb[tree_type * 2];
+   uint32_t block_type;
++  if (max_block_type <= 1) {
++    return BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH;
++  }
+ 
+   /* Read 0..15 + 3..39 bits */
+   if (!safe) {
+@@ -1074,11 +1077,13 @@ static BROTLI_INLINE BROTLI_BOOL DecodeB
+   } else {
+     BrotliBitReaderState memento;
+     BrotliBitReaderSaveState(br, &memento);
+-    if (!SafeReadSymbol(type_tree, br, &block_type)) return BROTLI_FALSE;
++    if (!SafeReadSymbol(type_tree, br, &block_type)) {
++      return BROTLI_DECODER_NEEDS_MORE_INPUT;
++    }
+     if (!SafeReadBlockLength(s, &s->block_length[tree_type], len_tree, br)) {
+       s->substate_read_block_length = BROTLI_STATE_READ_BLOCK_LENGTH_NONE;
+       BrotliBitReaderRestoreState(br, &memento);
+-      return BROTLI_FALSE;
++      return BROTLI_DECODER_NEEDS_MORE_INPUT;
+     }
+   }
+ 
+@@ -1094,7 +1099,7 @@ static BROTLI_INLINE BROTLI_BOOL DecodeB
+   }
+   ringbuffer[0] = ringbuffer[1];
+   ringbuffer[1] = block_type;
+-  return BROTLI_TRUE;
++  return BROTLI_DECODER_SUCCESS;
+ }
+ 
+ static BROTLI_INLINE void DetectTrivialLiteralBlockTypes(
+@@ -1131,61 +1136,67 @@ static BROTLI_INLINE void PrepareLiteral
+ 
+ /* Decodes the block type and updates the state for literal context.
+    Reads 3..54 bits. */
+-static BROTLI_INLINE BROTLI_BOOL DecodeLiteralBlockSwitchInternal(
++static BROTLI_INLINE BrotliDecoderErrorCode DecodeLiteralBlockSwitchInternal(
+     int safe, BrotliDecoderState* s) {
+-  if (!DecodeBlockTypeAndLength(safe, s, 0)) {
+-    return BROTLI_FALSE;
++  BrotliDecoderErrorCode result = DecodeBlockTypeAndLength(safe, s, 0);
++  if (result != BROTLI_DECODER_SUCCESS) {
++    return result;
+   }
+   PrepareLiteralDecoding(s);
+-  return BROTLI_TRUE;
++  return BROTLI_DECODER_SUCCESS;
+ }
+ 
+-static void BROTLI_NOINLINE DecodeLiteralBlockSwitch(BrotliDecoderState* s) {
+-  DecodeLiteralBlockSwitchInternal(0, s);
++static BROTLI_NOINLINE BrotliDecoderErrorCode
++DecodeLiteralBlockSwitch(BrotliDecoderState* s) {
++  return DecodeLiteralBlockSwitchInternal(0, s);
+ }
+ 
+-static BROTLI_BOOL BROTLI_NOINLINE SafeDecodeLiteralBlockSwitch(
++static BROTLI_NOINLINE BrotliDecoderErrorCode SafeDecodeLiteralBlockSwitch(
+     BrotliDecoderState* s) {
+   return DecodeLiteralBlockSwitchInternal(1, s);
+ }
+ 
+ /* Block switch for insert/copy length.
+    Reads 3..54 bits. */
+-static BROTLI_INLINE BROTLI_BOOL DecodeCommandBlockSwitchInternal(
++static BROTLI_INLINE BrotliDecoderErrorCode DecodeCommandBlockSwitchInternal(
+     int safe, BrotliDecoderState* s) {
+-  if (!DecodeBlockTypeAndLength(safe, s, 1)) {
+-    return BROTLI_FALSE;
++  BrotliDecoderErrorCode result = DecodeBlockTypeAndLength(safe, s, 1);
++  if (result != BROTLI_DECODER_SUCCESS) {
++    return result;
+   }
+   s->htree_command = s->insert_copy_hgroup.htrees[s->block_type_rb[3]];
+-  return BROTLI_TRUE;
++  return BROTLI_DECODER_SUCCESS;
+ }
+ 
+-static void BROTLI_NOINLINE DecodeCommandBlockSwitch(BrotliDecoderState* s) {
+-  DecodeCommandBlockSwitchInternal(0, s);
++static BROTLI_NOINLINE BrotliDecoderErrorCode
++DecodeCommandBlockSwitch(BrotliDecoderState* s) {
++  return DecodeCommandBlockSwitchInternal(0, s);
+ }
+-static BROTLI_BOOL BROTLI_NOINLINE SafeDecodeCommandBlockSwitch(
+-    BrotliDecoderState* s) {
++static BROTLI_NOINLINE BrotliDecoderErrorCode
++SafeDecodeCommandBlockSwitch(BrotliDecoderState* s) {
+   return DecodeCommandBlockSwitchInternal(1, s);
+ }
+ 
+ /* Block switch for distance codes.
+    Reads 3..54 bits. */
+-static BROTLI_INLINE BROTLI_BOOL DecodeDistanceBlockSwitchInternal(
++static BROTLI_INLINE BrotliDecoderErrorCode DecodeDistanceBlockSwitchInternal(
+     int safe, BrotliDecoderState* s) {
+-  if (!DecodeBlockTypeAndLength(safe, s, 2)) {
+-    return BROTLI_FALSE;
++  BrotliDecoderErrorCode result = DecodeBlockTypeAndLength(safe, s, 2);
++  if (result != BROTLI_DECODER_SUCCESS) {
++    return result;
+   }
+   s->dist_context_map_slice = s->dist_context_map +
+       (s->block_type_rb[5] << BROTLI_DISTANCE_CONTEXT_BITS);
+   s->dist_htree_index = s->dist_context_map_slice[s->distance_context];
+-  return BROTLI_TRUE;
++  return BROTLI_DECODER_SUCCESS;
+ }
+ 
+-static void BROTLI_NOINLINE DecodeDistanceBlockSwitch(BrotliDecoderState* s) {
+-  DecodeDistanceBlockSwitchInternal(0, s);
++static BROTLI_NOINLINE BrotliDecoderErrorCode
++DecodeDistanceBlockSwitch(BrotliDecoderState* s) {
++  return DecodeDistanceBlockSwitchInternal(0, s);
+ }
+ 
+-static BROTLI_BOOL BROTLI_NOINLINE SafeDecodeDistanceBlockSwitch(
++static BROTLI_NOINLINE BrotliDecoderErrorCode SafeDecodeDistanceBlockSwitch(
+     BrotliDecoderState* s) {
+   return DecodeDistanceBlockSwitchInternal(1, s);
+ }
+@@ -1570,6 +1581,9 @@ static BROTLI_INLINE BROTLI_BOOL CheckIn
+   return BrotliCheckInputAmount(br, num);
+ }
+ 
++/* NB: METHOD should return BROTLI_FALSE only in case there is not enough input;
++       in case of "unsafe" execution, when input is guaranteed to be sufficient,
++       result is ignored. */
+ #define BROTLI_SAFE(METHOD)                       \
+   {                                               \
+     if (safe) {                                   \
+@@ -1582,6 +1596,22 @@ static BROTLI_INLINE BROTLI_BOOL CheckIn
+     }                                             \
+   }
+ 
++/* NB: METHOD should return BROTLI_DECODER_SUCCESS, BROTLI_DECODER_ERROR_*, or
++   BROTLI_DECODER_NEEDS_MORE_INPUT; the later two break the processing. */
++#define BROTLI_SAFE_WITH_STATUS(METHOD)         \
++  {                                             \
++    BrotliDecoderErrorCode status;              \
++    if (safe) {                                 \
++      status = Safe##METHOD;                    \
++    } else {                                    \
++      status = METHOD;                          \
++    }                                           \
++    if (status != BROTLI_DECODER_SUCCESS) {     \
++      result = status;                          \
++      goto saveStateAndReturn;                  \
++    }                                           \
++  }
++
+ static BROTLI_INLINE BrotliDecoderErrorCode ProcessCommandsInternal(
+     int safe, BrotliDecoderState* s) {
+   int pos = s->pos;
+@@ -1620,7 +1650,7 @@ CommandBegin:
+     goto saveStateAndReturn;
+   }
+   if (BROTLI_PREDICT_FALSE(s->block_length[1] == 0)) {
+-    BROTLI_SAFE(DecodeCommandBlockSwitch(s));
++    BROTLI_SAFE_WITH_STATUS(DecodeCommandBlockSwitch(s));
+     goto CommandBegin;
+   }
+   /* Read the insert/copy length in the command */
+@@ -1648,7 +1678,7 @@ CommandInner:
+         goto saveStateAndReturn;
+       }
+       if (BROTLI_PREDICT_FALSE(s->block_length[0] == 0)) {
+-        BROTLI_SAFE(DecodeLiteralBlockSwitch(s));
++        BROTLI_SAFE_WITH_STATUS(DecodeLiteralBlockSwitch(s));
+         PreloadSymbol(safe, s->literal_htree, br, &bits, &value);
+         if (!s->trivial_literal_context) goto CommandInner;
+       }
+@@ -1684,7 +1714,7 @@ CommandInner:
+         goto saveStateAndReturn;
+       }
+       if (BROTLI_PREDICT_FALSE(s->block_length[0] == 0)) {
+-        BROTLI_SAFE(DecodeLiteralBlockSwitch(s));
++        BROTLI_SAFE_WITH_STATUS(DecodeLiteralBlockSwitch(s));
+         if (s->trivial_literal_context) goto CommandInner;
+       }
+       context = s->context_lookup1[p1] | s->context_lookup2[p2];
+@@ -1731,7 +1761,7 @@ CommandPostDecodeLiterals:
+   } else {
+     /* Read distance code in the command, unless it was implicitly zero. */
+     if (BROTLI_PREDICT_FALSE(s->block_length[2] == 0)) {
+-      BROTLI_SAFE(DecodeDistanceBlockSwitch(s));
++      BROTLI_SAFE_WITH_STATUS(DecodeDistanceBlockSwitch(s));
+     }
+     BROTLI_SAFE(ReadDistance(s, br));
+   }
+@@ -2039,6 +2069,8 @@ BrotliDecoderResult BrotliDecoderDecompr
+         if (result != BROTLI_DECODER_SUCCESS) {
+           break;
+         }
++        BROTLI_DCHECK(s->meta_block_remaining_len <=
++                      (int)BROTLI_BLOCK_SIZE_CAP);
+         BROTLI_LOG_UINT(s->is_last_metablock);
+         BROTLI_LOG_UINT(s->meta_block_remaining_len);
+         BROTLI_LOG_UINT(s->is_metadata);
+diff -rupN --no-dereference qtwebkit-5.212.0-alpha4/Source/ThirdParty/brotli/include/brotli/decode.h qtwebkit-5.212.0-alpha4-new/Source/ThirdParty/brotli/include/brotli/decode.h
+--- qtwebkit-5.212.0-alpha4/Source/ThirdParty/brotli/include/brotli/decode.h	2020-03-04 18:16:37.000000000 +0100
++++ qtwebkit-5.212.0-alpha4-new/Source/ThirdParty/brotli/include/brotli/decode.h	2026-10-25 23:06:31.867872833 +0100
+@@ -84,8 +84,9 @@ typedef enum {
+   BROTLI_ERROR_CODE(_ERROR_FORMAT_, PADDING_1, -14) SEPARATOR              \
+   BROTLI_ERROR_CODE(_ERROR_FORMAT_, PADDING_2, -15) SEPARATOR              \
+                                                                            \
+-  /* -16..-17 codes are reserved */                                        \
++  /* -16 codes are reserved */                                        \
+                                                                            \
++  BROTLI_ERROR_CODE(_ERROR_FORMAT_, BLOCK_SWITCH, -17) SEPARATOR           \
+   BROTLI_ERROR_CODE(_ERROR_, COMPOUND_DICTIONARY, -18) SEPARATOR           \
+   BROTLI_ERROR_CODE(_ERROR_, DICTIONARY_NOT_SET, -19) SEPARATOR            \
+   BROTLI_ERROR_CODE(_ERROR_, INVALID_ARGUMENTS, -20) SEPARATOR             \

diff --git a/mingw-qt5-qtwebkit.spec b/mingw-qt5-qtwebkit.spec
index a69d302..c7e14b1 100644
--- a/mingw-qt5-qtwebkit.spec
+++ b/mingw-qt5-qtwebkit.spec
@@ -21,7 +21,7 @@
 
 Name:           mingw-qt5-%{qt_module}
 Version:        5.212.0
-Release:        0.45%{?pre:.%pre}%{?commit:.git%{shortcommit}}%{?dist}
+Release:        0.46%{?pre:.%pre}%{?commit:.git%{shortcommit}}%{?dist}
 Summary:        Qt5 for Windows - QtWebKit component
 
 License:        LGPL-2.1-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
@@ -57,6 +57,9 @@ Patch9:         qtwebkit-c++17.patch
 Patch10:        qtwebkit_cmakever.patch
 # Fix build against gcc15
 Patch11:        qtwebkit_gcc15.patch
+# Backport fix for CVE-2026-111497 (bundled brotli)
+# https://github.com/google/brotli/commit/b418fa81c48262a86a95332b0bc6d62c30aa78b6.patch
+Patch12:        CVE-2026-111497.patch
 
 BuildArch:      noarch
 
@@ -264,6 +267,9 @@ rmdir %{buildroot}%{mingw64_libdir}/qt5/bin/
 
 
 %changelog
+* Sun Oct 25 2026 Sandro Mani <manisandro@gmail.com> - 5.212.0-0.46.alpha4
+- Backport fix for CVE-2026-111497
+
 * Wed Sep 16 2026 Sandro Mani <manisandro@gmail.com> - 5.212.0-0.45.alpha4
 - Rebuild (mingw-libxml2)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-31 15:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31 15:36 [rpms/mingw-qt5-qtwebkit] f43: Backport fix for CVE-2026-111497 Sandro Mani

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