From 7cc8973db70f70252ba6a59039c678e9933cf8c7 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 2 Dec 2025 16:17:36 +0100 Subject: [PATCH] charon-nm: Pass configured user when connecting to SSH/GPG agent This prevents an attack similar to the one fixed previously where a user passes the path to credentials of another user, in this case the path to the agent socket of that user. --- src/charon-nm/nm/nm_service.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/charon-nm/nm/nm_service.c b/src/charon-nm/nm/nm_service.c index d24e7b29e4..50a65e9457 100644 --- a/src/charon-nm/nm/nm_service.c +++ b/src/charon-nm/nm/nm_service.c @@ -637,6 +637,7 @@ static bool add_auth_cfg_cert(NMStrongswanPluginPrivate *priv, private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY, public->get_type(public), BUILD_AGENT_SOCKET, str, + BUILD_AGENT_USER, user, BUILD_PUBLIC_KEY, public, BUILD_END); public->destroy(public); -- 2.47.3