What changed, and why it matters
This change fixes a privacy leak in the Monero daemon. When a user ran the node through a proxy and had disabled DNS leaks, the daemon's manual 'update' RPC commands could still perform DNS lookups to check for new software versions. The patch now blocks those update checks when DNS is disallowed, preventing the user's real IP from being exposed via DNS queries.
No immediate action beyond applying the patch. Users relying on proxy privacy should ensure they run a version containing this fix and continue to use --proxy without --proxy-allow-dns-leaks when DNS leak prevention is desired.
Security signals we found
Privacy leak: DNS queries bypass proxy settings
RPC command gated by DNS permission flag
Functional tests assert expected blocking behavior
Evidence from the diff
The patch adds an m_allow_dns flag to cryptonote_core that tracks whether DNS is permitted (false when –proxy is used without –proxy-allow-dns-leaks). The update RPC handler in core_rpc_server.cpp now checks is_dns_allowed() and returns an error status before calling tools::check_updates(), which would otherwise perform DNS resolution. Functional tests are added to verify that check/download/update RPC commands return update=False and the expected status message when DNS leaks are disabled.
Changed components
src/cryptonote_core/cryptonote_core.cppsrc/cryptonote_core/cryptonote_core.hsrc/rpc/core_rpc_server.cpptests/functional_tests/daemon_info.pytests/functional_tests/functional_tests_rpc.pyInspect captured patch +20 / −1
### src/cryptonote_core/cryptonote_core.cpp
@@ -228,6 +228,7 @@ namespace cryptonote
m_last_dns_checkpoints_update(0),
m_last_json_checkpoints_update(0),
m_disable_dns_checkpoints(false),
+ m_allow_dns(true),
m_update_download(0),
m_nettype(UNDEFINED),
m_update_available(false)
@@ -455,6 +456,7 @@ namespace cryptonote
bool r = handle_command_line(vm);
CHECK_AND_ASSERT_MES(r, false, "Failed to handle command line");
m_disable_dns_checkpoints |= not allow_dns;
+ m_allow_dns = allow_dns;
std::string db_sync_mode = command_line::get_arg(vm, cryptonote::arg_db_sync_mode);
bool db_salvage = command_line::get_arg(vm, cryptonote::arg_db_salvage) != 0;
### src/cryptonote_core/cryptonote_core.h
@@ -439,6 +439,7 @@ namespace cryptonote
* @param disable whether to disable DNS checkpoints
*/
void disable_dns_checkpoints(bool disable = true) { m_disable_dns_checkpoints = disable; }
+ bool is_dns_allowed() const { return m_allow_dns; }
/**
* @copydoc tx_memory_pool::have_tx
@@ -1067,6 +1068,7 @@ namespace cryptonote
std::atomic_flag m_checkpoints_updating; //!< set if checkpoints are currently updating to avoid multiple threads attempting to update at once
bool m_disable_dns_checkpoints;
+ bool m_allow_dns;
size_t block_sync_size;
std::uint64_t batch_max_weight;
### src/rpc/core_rpc_server.cpp
@@ -2727,6 +2727,11 @@ namespace cryptonote
res.status = std::string("unknown command: '") + req.command + "'";
return true;
}
+ if (!m_core.is_dns_allowed())
+ {
+ res.status = "DNS update checks are disabled when using --proxy without --proxy-allow-dns-leaks";
+ return true;
+ }
std::string version, hash;
if (!tools::check_updates(software, buildtag, version, hash))
### tests/functional_tests/daemon_info.py
@@ -44,6 +44,16 @@ class DaemonGetInfoTest():
def run_test(self):
self._test_hardfork_info()
self._test_get_info()
+ self._test_update_with_proxy()
+
+ def _test_update_with_proxy(self):
+ print('Test update with proxy and DNS leaks disabled')
+
+ daemon = Daemon(idx = 1)
+ for command in ('check', 'download', 'update'):
+ res = daemon.update(command, path = '')
+ assert res['update'] == False
+ assert res.status == 'DNS update checks are disabled when using --proxy without --proxy-allow-dns-leaks'
def _test_hardfork_info(self):
print('Test hard_fork_info')
### tests/functional_tests/functional_tests_rpc.py
@@ -56,7 +56,7 @@
monerod_extra = [
["--offline"],
- ["--offline"],
+ ["--proxy", "127.0.0.1:1", "--no-sync"],
["--add-exclusive-node", "127.0.0.1:18283"],
["--add-exclusive-node", "127.0.0.1:18282"],
["--rpc-login", "md5_lover:Z1ON0101", "--rpc-restricted-bind-port", "18194", "--offline"],Why this scored 38/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.