Menu

#1664 Server configuration changes don't survive a restart -- registry write bug (2.8.87)

open
nobody
7
24 hours ago
24 hours ago
No

All TightVNC server settings (passwords, ports, ACLs) silently revert
after a service restart due to a bug in RegistrySettingsManager.

setString() (config-lib/RegistrySettingsManager.cpp:132):
RegistryKey subKey(m_key, keyName.getString(), false);
return subKey.setValueAsString(name, value); // BUG

extractValueName() correctly extracts leaf name "PrimaryPassword" from
"Server\PrimaryPassword", but the write passes the full compound path
as the value name. getString() reads back using the leaf name and finds
nothing. Same bug in setLong() (line 158) and setInt() (line 209).

To reproduce:

  1. Open TightVNC Server configuration.
  2. Change primary password or port number.
  3. Save, restart service.
  4. Reopen configuration - change is gone.

Attached PoC does the live registry write/read roundtrip and shows
QueryValueEx('PrimaryPassword') returns None while the data is actually
stored under 'Server\PrimaryPassword'.

Fix: pass valueName.getString() instead of name in lines 132, 158, 209.
Version: 2.8.87.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB