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