public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: nmontero <nmontero@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gnome-initial-setup] f44: Add patch to fix crash when selecting wifi network
Date: Wed, 29 Jul 2026 10:53:05 GMT [thread overview]
Message-ID: <178532238559.1.13258426623760078895.rpms-gnome-initial-setup-05c60567b95e@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gnome-initial-setup
Branch : f44
Commit : 05c60567b95e7fb3889137f7a046b170800cc9b8
Author : nmontero <nmontero@redhat.com>
Date : 2026-07-29T12:42:27+02:00
Stats : +48/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gnome-initial-setup/c/05c60567b95e7fb3889137f7a046b170800cc9b8?branch=f44
Log:
Add patch to fix crash when selecting wifi network
https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/work_items/250
---
diff --git a/0001-network-Prevent-crash-when-ssid-gets-freed.patch b/0001-network-Prevent-crash-when-ssid-gets-freed.patch
new file mode 100644
index 0000000..551ff40
--- /dev/null
+++ b/0001-network-Prevent-crash-when-ssid-gets-freed.patch
@@ -0,0 +1,45 @@
+From 2cab99a7328354272e60b978d3af3375e65c3c46 Mon Sep 17 00:00:00 2001
+From: Kean Ren <rh_king@163.com>
+Date: Tue, 28 Jul 2026 15:47:14 +0800
+Subject: [PATCH] network: Prevent crash when ssid gets freed
+
+The previous fix (commit 685ce053) took a copy of object-path so that
+the row widget's reference survives the next Wi-Fi scan, which deletes
+and recreates NMAccessPoint objects. The same hazard applies to the
+ssid GBytes: it is owned by the NMAccessPoint and is freed when the AP
+is replaced on the next scan. Leaving the dangling pointer stored on
+the row causes row_activated() to dereference freed memory and crash.
+
+Take a reference on ssid with g_bytes_ref() and release it via
+g_bytes_unref() when the row is destroyed, mirroring the existing
+object-path handling.
+---
+ gnome-initial-setup/pages/network/gis-network-page.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/gnome-initial-setup/pages/network/gis-network-page.c b/gnome-initial-setup/pages/network/gis-network-page.c
+index ac9696f7..6f87448b 100644
+--- a/gnome-initial-setup/pages/network/gis-network-page.c
++++ b/gnome-initial-setup/pages/network/gis-network-page.c
+@@ -305,10 +305,16 @@ add_access_point (GisNetworkPage *page, NMAccessPoint *ap, NMAccessPoint *active
+ strength = G_MAXUINT;
+
+ /* Copy object_path; it points into the NM AP object which may be
+- * freed on the next Wi-Fi scan, creating a dangling pointer. */
++ * freed on the next Wi-Fi scan, creating a dangling pointer.
++ * Take a reference on ssid for the same reason: the GBytes is owned
++ * by the NM access point and would otherwise be freed when the AP
++ * is replaced on the next scan, leaving the row with a dangling
++ * pointer that crashes row_activated(). */
+ g_object_set_data_full (G_OBJECT (row), "object-path",
+ g_strdup (object_path), g_free);
+- g_object_set_data (G_OBJECT (row), "ssid", (gpointer) ssid);
++ g_object_set_data_full (G_OBJECT (row), "ssid",
++ g_bytes_ref (ssid),
++ (GDestroyNotify) g_bytes_unref);
+ g_object_set_data (G_OBJECT (row), "strength", GUINT_TO_POINTER (strength));
+
+ gtk_list_box_append (GTK_LIST_BOX (priv->network_list), row);
+--
+2.53.0
+
diff --git a/gnome-initial-setup.spec b/gnome-initial-setup.spec
index 6bf9698..358c8a6 100644
--- a/gnome-initial-setup.spec
+++ b/gnome-initial-setup.spec
@@ -30,6 +30,9 @@ Patch: no-run0.patch
# https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/work_items/248
Patch1: network-prevent-crash-for-invalid-ap-object-paths.patch
+# https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/work_items/250
+Patch2: 0001-network-Prevent-crash-when-ssid-gets-freed.patch
+
BuildRequires: desktop-file-utils
BuildRequires: gcc
BuildRequires: meson
reply other threads:[~2026-07-29 10:53 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=178532238559.1.13258426623760078895.rpms-gnome-initial-setup-05c60567b95e@fedoraproject.org \
--to=nmontero@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