Skip to content

v2.2.0 — Security & Stability

Choose a tag to compare

@rokogan rokogan released this 17 Apr 15:27
· 45 commits to master since this release

28 Bug Fixes from Deep Code Review

Critical (4)

  • Buffer overflow protection — bounds check before WebSocket unmask loop prevents heap corruption
  • 64-bit frame length — proper handling of large WebSocket frames in TV service
  • Race condition fixed — screen display assignment now synchronous, eliminates null dereference
  • Division by zero — guarded absolute position calculation when no displays available

High Severity (6)

  • WebSocket stale reference — checks readyState before reconnecting, prevents stuck connections
  • Command injection blocked — shell metacharacters (&|;><) rejected in key binding commands
  • Named pipe secured — PipeSecurity restricts access to authenticated users only
  • Socket cleanup — catch-all ensures cursor and resources reset on any error
  • XSS prevention — scroll exclusion names use textContent instead of innerHTML
  • Cursor counter — clamped to prevent negative values corrupting cursor state

Medium Severity (7)

  • Timer disposal race — 50ms delay between Stop and Dispose prevents use-after-free
  • Thread-safe scroll exclusions — Interlocked.Exchange for concurrent access
  • Duplicate WoL prevention — guard prevents multiple Wake-on-LAN intervals
  • SSDP double-response — flag prevents responding twice to discovery
  • SSAP reconnect stacking — clears pending timeout before new reconnect
  • CSRF headers — X-Requested-With on all POST requests
  • Input validation — port 1-65535, cursor speed 0.1-5.0 in web UI

Low Severity (6)

  • Synchronous XHR documented as intentional
  • Thread-safe client IP tracking
  • Error log capped at 10K chars
  • Font fallback chain added
  • Long-click threshold now configurable
  • Toast timeout properly cleared

Architecture (2)

  • Connection state machine — DISCONNECTED/CONNECTING/CONNECTED/CLOSING prevents race conditions
  • Named constants — 10 magic numbers replaced with descriptive variables

Upgrade

Download and extract over existing install. Run install.bat as Admin to rebuild, or just replace the exe and settings-ui.html.