All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] cifs-utils/svcgssd: Fix use-after-free bug (config variables)
@ 2022-06-07  8:19 marcel
  2022-06-07  8:19 ` [PATCH 2/3] cifs-utils/svcgssd: Display principal if set marcel
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: marcel @ 2022-06-07  8:19 UTC (permalink / raw)
  To: linux-nfs; +Cc: Marcel Ritter

From: Marcel Ritter <marcel@linux-ng.de>

This patch fixes a bug when trying to set "principal" in /etc/nfs.conf.
Memory gets freed by conf_cleanup() before being used - moving cleanup
code resolves that.

---
 utils/gssd/svcgssd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/utils/gssd/svcgssd.c b/utils/gssd/svcgssd.c
index 881207b3..a242b789 100644
--- a/utils/gssd/svcgssd.c
+++ b/utils/gssd/svcgssd.c
@@ -211,9 +211,6 @@ main(int argc, char *argv[])
 	rpc_verbosity = conf_get_num("svcgssd", "RPC-Verbosity", rpc_verbosity);
 	idmap_verbosity = conf_get_num("svcgssd", "IDMAP-Verbosity", idmap_verbosity);
 
-	/* We don't need the config anymore */
-	conf_cleanup();
-
 	while ((opt = getopt(argc, argv, "fivrnp:")) != -1) {
 		switch (opt) {
 			case 'f':
@@ -328,6 +325,9 @@ main(int argc, char *argv[])
 
 	daemon_ready();
 
+	/* We don't need the config anymore */
+	conf_cleanup();
+
 	nfs4_init_name_mapping(NULL); /* XXX: should only do this once */
 
 	rc = event_base_dispatch(evbase);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-27 18:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-07  8:19 [PATCH 1/3] cifs-utils/svcgssd: Fix use-after-free bug (config variables) marcel
2022-06-07  8:19 ` [PATCH 2/3] cifs-utils/svcgssd: Display principal if set marcel
2022-06-07  8:19 ` [PATCH 3/3] cifs-utils/svcgssd: Add (undocumented) config options to man page marcel
2022-06-27 18:57   ` Andreas Hasenack
2022-06-08 16:59 ` [PATCH 1/3] cifs-utils/svcgssd: Fix use-after-free bug (config variables) marcel
2022-06-21 13:26 ` Steve Dickson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.