Skip to content

Commit

Permalink
Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet
Browse files Browse the repository at this point in the history
RPCRunLater job name

The job name is logged, and could pose as an information leak to someone
attacking the process, helping them counteract ASLR protections
  • Loading branch information
luke-jr authored and random-zebra committed May 17, 2021
1 parent ca6a62d commit 3bfa7d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3427,7 +3427,7 @@ UniValue walletpassphrase(const JSONRPCRequest& request)

if (nSleepTime > 0) {
pwallet->nRelockTime = GetTime () + nSleepTime;
RPCRunLater ("lockwallet", std::bind (LockWallet, pwallet), nSleepTime);
RPCRunLater (strprintf("lockwallet(%s)", pwallet->GetName()), std::bind (LockWallet, pwallet), nSleepTime);
}

return NullUniValue;
Expand Down

0 comments on commit 3bfa7d8

Please sign in to comment.