[PR #3196] ipc: sanitize certutil arguments and redact sensitive process args from logs #3128

Open
opened 2026-10-15 04:07:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/3196
Author: @hasanerman
Created: 9/22/2026
Status: 🔄 Open

Base: dev ← Head: fix/ipc-cert-sanitize-and-logging


📝 Commits (1)

  • 53b6d6b ipc: sanitize certutil arguments and redact sensitive process args from logs

📊 Changes

2 files changed (+27 additions, -2 deletions)

View changed files

📝 ipc/ipc.h (+6 -1)
📝 ipc/ipcserverprocess.cpp (+21 -1)

📄 Description

The sanitizeArguments() function bypasses validation entirely for CertUtil
(case CertUtil: return args;), unlike OpenVPN and Tun2Socks which validate
their arguments against an allow-list before they reach the privileged process.

This adds the same allow-list pattern for CertUtil (-f, -importpfx, -p ,
file path, "NoExport"), matching the actual call site in
ikev2VpnProtocolWindows.cpp.

Also, IpcServerProcess::start() logged the full process arguments via qDebug(),
including config/management paths and the cert password. These are now redacted
before logging.

No behavior change — only stricter validation and reduced log exposure.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amnezia-client/pull/3196 **Author:** [@hasanerman](https://github.com/hasanerman) **Created:** 9/22/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix/ipc-cert-sanitize-and-logging` --- ### 📝 Commits (1) - [`53b6d6b`](https://github.com/amnezia-vpn/amnezia-client/commit/53b6d6bb8b28dd89d9fe8833f7650e53d97f77f5) ipc: sanitize certutil arguments and redact sensitive process args from logs ### 📊 Changes **2 files changed** (+27 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `ipc/ipc.h` (+6 -1) 📝 `ipc/ipcserverprocess.cpp` (+21 -1) </details> ### 📄 Description The `sanitizeArguments()` function bypasses validation entirely for CertUtil (`case CertUtil: return args;`), unlike OpenVPN and Tun2Socks which validate their arguments against an allow-list before they reach the privileged process. This adds the same allow-list pattern for CertUtil (-f, -importpfx, -p <value>, file path, "NoExport"), matching the actual call site in ikev2VpnProtocolWindows.cpp. Also, IpcServerProcess::start() logged the full process arguments via qDebug(), including config/management paths and the cert password. These are now redacted before logging. No behavior change — only stricter validation and reduced log exposure. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#3128
No description provided.