Blame SOURCES/1020-fix-unauth-user-can-make-nm-crash-rh1890887.patch

5a0c56
From 62536f5ebddfca3e57f8771c8480a52fc4d558d1 Mon Sep 17 00:00:00 2001
5a0c56
From: Antonio Cardace <acardace@redhat.com>
5a0c56
Date: Thu, 22 Oct 2020 14:40:15 +0200
5a0c56
Subject: [PATCH 1/1] manager: fix very bad usage of
5a0c56
 'nm_utils_user_data_unpack'
5a0c56
5a0c56
This results in the args of 'nm_utils_user_data_unpack'
5a0c56
containing random data potentially also from the
5a0c56
previous stack-frame which is really really bad.
5a0c56
5a0c56
Signed-off-by: Antonio Cardace <acardace@redhat.com>
5a0c56
Fixes: b50702775f1b ('device: implement auth-request as async operation nm_manager_device_auth_request()')
5a0c56
(cherry picked from commit b6a18e059302117157971e7c5f551fc40d864e89)
5a0c56
(cherry picked from commit 50adaf7414a62f08a309f11941453eae75c9e0e9)
5a0c56
(cherry picked from commit 72a2e34b42e9f6e38ba2fc5b5db96015930827a2)
5a0c56
---
5a0c56
 src/nm-manager.c | 9 ++++++++-
5a0c56
 1 file changed, 8 insertions(+), 1 deletion(-)
5a0c56
5a0c56
diff --git a/src/nm-manager.c b/src/nm-manager.c
5a0c56
index 778e3b946..57f3e8dd9 100644
5a0c56
--- a/src/nm-manager.c
5a0c56
+++ b/src/nm-manager.c
5a0c56
@@ -2453,7 +2453,14 @@ _device_auth_done_fail_on_idle (gpointer user_data, GCancellable *cancellable)
5a0c56
 	NMManagerDeviceAuthRequestFunc callback;
5a0c56
 	gpointer callback_user_data;
5a0c56
 
5a0c56
-	nm_utils_user_data_unpack (&self, &device, &context, &subject, &error_original, &callback, &callback_user_data);
5a0c56
+	nm_utils_user_data_unpack (user_data,
5a0c56
+	                           &self,
5a0c56
+	                           &device,
5a0c56
+	                           &context,
5a0c56
+	                           &subject,
5a0c56
+	                           &error_original,
5a0c56
+	                           &callback,
5a0c56
+	                           &callback_user_data);
5a0c56
 
5a0c56
 	g_cancellable_set_error_if_cancelled (cancellable, &error_cancelled);
5a0c56
 
5a0c56
-- 
5a0c56
2.28.0
5a0c56