fix(security): pin the pool TLS certificate fingerprint (F12)

With pool TLS enabled but no fingerprint pinned, xmrig accepts ANY certificate
(verifyFingerprint passes on a null fingerprint), so an on-path attacker could
MITM the stratum session and capture/redirect the login. The wallet never set a
fingerprint and had no setting for one.

Add a pool_tls_fingerprint setting, emit it as the xmrig "tls-fingerprint" pool
key when non-empty, and refuse to start pool mining with TLS on but no
fingerprint (mining_tls_needs_fingerprint) so "pool TLS on" actually
authenticates the pool. pool_tls still defaults off.

English-only for the new string; 8 locales fall back.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-11-08 11:52:57 -06:00
co-authored by Claude Opus 4.8
parent cd37b1be3a
commit 5ffb083855
6 changed files with 34 additions and 10 deletions
+11
View File
@@ -3703,6 +3703,17 @@ void App::postPoolMinerJob(int threads, bool retargetOnly)
cfg.algo = util::resolvePoolAlgo(cfg.pool_url, settings_->getPoolAlgo());
cfg.threads = threads; // Use the same thread selection as solo mining
cfg.tls = settings_->getPoolTls();
cfg.tls_fingerprint = settings_->getPoolTlsFingerprint();
// Refuse pool TLS without a pinned certificate fingerprint: xmrig otherwise accepts ANY certificate,
// which an on-path attacker can exploit to MITM the stratum session (capturing the login / feeding
// jobs). Require the fingerprint so "pool TLS on" actually authenticates the pool. (F12)
if (cfg.tls && cfg.tls_fingerprint.empty()) {
const std::string merr = TR("mining_tls_needs_fingerprint");
setMiningError(merr);
ui::Notifications::instance().error(merr);
if (retargetOnly) stopPoolMining();
return;
}
cfg.hugepages = settings_->getPoolHugepages();
// xmrig "user" is the pool login the block rewards are credited to. The user's