public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adrian Vovk <avovk@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/glib-networking] f43: Fix CVE-2026-103963
Date: Fri, 30 Oct 2026 18:46:27 GMT	[thread overview]
Message-ID: <179338598764.1.17816099801143665216.rpms-glib-networking-c7ba6bd337bd@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/glib-networking
Branch : f43
Commit : c7ba6bd337bd57067092f155c8fad1f2d09d122d
Author : Adrian Vovk <avovk@redhat.com>
Date   : 2026-10-30T14:46:09-04:00
Stats  : +220/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/glib-networking/c/c7ba6bd337bd57067092f155c8fad1f2d09d122d?branch=f43

Log:
Fix CVE-2026-103963

---
diff --git a/CVE-2026-103963.patch b/CVE-2026-103963.patch
new file mode 100644
index 0000000..2c73080
--- /dev/null
+++ b/CVE-2026-103963.patch
@@ -0,0 +1,218 @@
+From 2df47856016fdd3ac7544cc7c899b22819c29c4e Mon Sep 17 00:00:00 2001
+From: Nieves Montero Fernandez <nmontero@redhat.com>
+Date: Mon, 28 Sep 2026 14:03:40 +0200
+Subject: [PATCH] tls: bound TLS 1.3 session ticket cache
+
+TLS 1.3 servers may issue multiple session tickets for the same
+session ID. These tickets are currently appended to a per-session
+queue without any bound, allowing a malicious peer to cause
+unbounded memory growth during the cache lifetime.
+
+Limit the number of cached TLS 1.3 session tickets to 32 entries per
+session ID. When the limit is reached, evict and release the oldest
+ticket before storing a new one.
+
+Add a regression test which stores more tickets than the configured
+limit and verifies that only the most recent tickets remain available
+in FIFO order.
+
+Closes: https://gitlab.gnome.org/GNOME/glib-networking/-/work_items/234
+
+Found by AISLE in partnership with Red Hat
+---
+ tls/base/gtlssessioncache.c |  13 ++++
+ tls/tests/meson.build       |  18 ++++++
+ tls/tests/session-cache.c   | 121 ++++++++++++++++++++++++++++++++++++
+ 3 files changed, 152 insertions(+)
+ create mode 100644 tls/tests/session-cache.c
+
+diff --git a/tls/base/gtlssessioncache.c b/tls/base/gtlssessioncache.c
+index 69d2cf08..876cbb8f 100644
+--- a/tls/base/gtlssessioncache.c
++++ b/tls/base/gtlssessioncache.c
+@@ -45,6 +45,7 @@ static GHashTable *client_session_cache; /* (owned) GString -> (owned) GTlsCache
+ 
+ #define SESSION_CACHE_MAX_SIZE 50
+ #define SESSION_CACHE_MAX_AGE (10ll * 60ll * G_USEC_PER_SEC) /* ten minutes */
++#define SESSION_CACHE_MAX_TLS13_TICKETS 32
+ 
+ typedef struct {
+   gpointer       tls1_2_session_ticket;
+@@ -155,6 +156,18 @@ g_tls_store_session_data (gchar              *session_id,
+        protocol_version < G_TLS_PROTOCOL_VERSION_DTLS_1_0) ||
+       protocol_version > G_TLS_PROTOCOL_VERSION_DTLS_1_2)
+     {
++      while (g_queue_get_length (cache_data->tls1_3_session_tickets) >=
++             SESSION_CACHE_MAX_TLS13_TICKETS)
++        {
++          gpointer evicted_session_data;
++
++          evicted_session_data =
++            g_queue_pop_head (cache_data->tls1_3_session_tickets);
++
++          if (evicted_session_data && cache_data->dec_ref)
++            cache_data->dec_ref (evicted_session_data);
++        }
++
+       g_queue_push_tail (cache_data->tls1_3_session_tickets, session_data_tmp);
+     }
+   else
+diff --git a/tls/tests/meson.build b/tls/tests/meson.build
+index a23b29f2..9de932f2 100644
+--- a/tls/tests/meson.build
++++ b/tls/tests/meson.build
+@@ -45,6 +45,24 @@ test_programs = [
+ #  ['dtls-connection', ['mock-interaction.c', 'lossy-socket.c'], deps, [], [mock_pkcs11_module]],
+ ]
+ 
++session_cache_test = executable(
++  'session-cache',
++  'session-cache.c',
++  include_directories: incs,
++  dependencies: [
++    gio_dep,
++    glib_dep,
++    gobject_dep,
++    tlsbase_dep,
++  ]
++)
++
++test(
++  'session-cache',
++  session_cache_test,
++  env: envs
++)
++
+ foreach backend: backends
+   foreach program: test_programs
+     program_name = program[0] + '-' + backend
+diff --git a/tls/tests/session-cache.c b/tls/tests/session-cache.c
+new file mode 100644
+index 00000000..01120f77
+--- /dev/null
++++ b/tls/tests/session-cache.c
+@@ -0,0 +1,121 @@
++/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
++/*
++ * GIO TLS tests
++ *
++ * Copyright 2026 Red Hat, Inc.
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General
++ * Public License along with this library; if not, see
++ * <http://www.gnu.org/licenses/>.
++ *
++ * In addition, when the library is used with OpenSSL, a special
++ * exception applies. Refer to the LICENSE_EXCEPTION file for details.
++ *
++ * Author: Nieves Montero <nmontero@redhat.com>
++ */
++
++#include <gio/gio.h>
++
++#include "gtlssessioncache.h"
++
++#define TEST_SESSION_ID "test-session"
++#define TEST_TICKET_COUNT 40
++#define TEST_EXPECTED_TICKETS 32
++
++static gpointer
++session_dup (gpointer session_data)
++{
++  return g_bytes_ref (session_data);
++}
++
++static gint
++session_acquire (gpointer session_data)
++{
++  g_bytes_ref (session_data);
++  return TRUE;
++}
++
++static void
++session_release (gpointer session_data)
++{
++  g_bytes_unref (session_data);
++}
++
++static GBytes *
++create_ticket (guint value)
++{
++  return g_bytes_new (&value, sizeof (value));
++}
++
++static guint
++get_ticket_value (GBytes *ticket)
++{
++  gsize size;
++  const guint *value;
++
++  value = g_bytes_get_data (ticket, &size);
++
++  g_assert_cmpuint (size, ==, sizeof (*value));
++
++  return *value;
++}
++
++static void
++test_tls13_session_ticket_limit (void)
++{
++  guint i;
++
++  for (i = 0; i < TEST_TICKET_COUNT; i++)
++    {
++      GBytes *ticket;
++
++      ticket = create_ticket (i);
++
++      g_tls_store_session_data (TEST_SESSION_ID,
++                                ticket,
++                                session_dup,
++                                session_acquire,
++                                session_release,
++                                G_TLS_PROTOCOL_VERSION_TLS_1_3);
++
++      g_bytes_unref (ticket);
++    }
++
++  for (i = TEST_TICKET_COUNT - TEST_EXPECTED_TICKETS;
++       i < TEST_TICKET_COUNT;
++       i++)
++    {
++      GBytes *ticket;
++
++      ticket = g_tls_lookup_session_data (TEST_SESSION_ID);
++
++      g_assert_nonnull (ticket);
++      g_assert_cmpuint (get_ticket_value (ticket), ==, i);
++
++      g_bytes_unref (ticket);
++    }
++
++  g_assert_null (g_tls_lookup_session_data (TEST_SESSION_ID));
++}
++
++int
++main (int   argc,
++      char *argv[])
++{
++  g_test_init (&argc, &argv, NULL);
++
++  g_test_add_func ("/tls/session-cache/tls13-ticket-limit",
++                   test_tls13_session_ticket_limit);
++
++  return g_test_run ();
++}
+-- 
+GitLab
+

diff --git a/glib-networking.spec b/glib-networking.spec
index 2c6df4b..89fc021 100644
--- a/glib-networking.spec
+++ b/glib-networking.spec
@@ -15,6 +15,8 @@ License:        LGPL-2.1-or-later WITH cryptsetup-OpenSSL-exception
 URL:            https://gitlab.gnome.org/GNOME/glib-networking
 Source0:        https://download.gnome.org/sources/glib-networking/2.80/%{name}-%{tarball_version}.tar.xz
 
+Patch:          CVE-2026-103963.patch
+
 BuildRequires:  ca-certificates
 BuildRequires:  gcc
 BuildRequires:  gettext

                 reply	other threads:[~2026-10-30 18:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=179338598764.1.17816099801143665216.rpms-glib-networking-c7ba6bd337bd@fedoraproject.org \
    --to=avovk@redhat.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