Skip to content

Commit 9756be3

Browse files
committed
Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet 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
1 parent 86be48a commit 9756be3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,7 @@ UniValue walletpassphrase(const JSONRPCRequest& request)
20772077

20782078
int64_t nSleepTime = request.params[1].get_int64();
20792079
pwallet->nRelockTime = GetTime() + nSleepTime;
2080-
RPCRunLater(strprintf("lockwallet_%u", uintptr_t(pwallet)), boost::bind(LockWallet, pwallet), nSleepTime);
2080+
RPCRunLater(strprintf("lockwallet(%s)", pwallet->strWalletFile), boost::bind(LockWallet, pwallet), nSleepTime);
20812081

20822082
return NullUniValue;
20832083
}

0 commit comments

Comments
 (0)