Repository navigation
Redoubt v2.3.1
!! SKIPPED TESTS (DOCUMENTATION) !!
Two live Tor integration tests in tests/test_tor_manager.py (test_real_tor_creates_exactly_the_address_derived_from_our_key and test_real_tor_dies_with_its_owner_and_stop_kills_the_process) were skipped in the CI runner environment because a live tor daemon/binary was not installed on the test runner. (will be corrected in v2.3.2)
Security
No known exploited vulnerability fixes. Hardening:
~/.redoubt/redoubt.logand~/.redoubt/settings.jsonare now created with mode0600, and~/.redoubtwith0700; existing files and the directory are tightened at startup. Before, they followed the defaultumaskand could be readable by other local users (log metadata such as IP addresses and Tor events). Best effort on Windows.zero_bytearrayandSecureBuffer.zero()usectypes.memseton the real buffer instead of a Python loop. Key material held in immutablebytesobjects can still remain in memory until garbage collection; this is a Python limitation and is not changed.install.shcan verify the AppImage checksum against the releaseSHA256SUMS. The checksum comes from the same GitHub release as the binary: it detects corruption or a tampered single asset, but not a compromise of the release itself. Signed releases are not provided.- Stricter packet field validation and the handshake-aware session cap reduce what a malformed or flooding peer can make Redoubt do before the handshake completes.
Improvements
Message delivery and data integrity
- A message is now persisted before the irreversible steps. On send,
store_messageruns before the Double Ratchet advances and before the socket write; on receive, decrypt, then store, thencommit()of the ratchet. If the database write fails, no ratchet step is consumed and noMESSAGE_ACKis sent, so the sender's retransmission can be decrypted and stored again. pending_acksis registered beforesession.send()(and removed if the send fails). A fastMESSAGE_ACKcan no longer leave an orphan entry that causes a redundant retransmission.- An outbox message larger than
MAX_MESSAGE_BYTESis dropped before consuming a ratchet step (the UI already refuses such messages). - Outbox messages queued within the same second are now sent in insertion order (
created_athas 1-second resolution;rowidbreaks ties).get_historyandget_last_messagebreak same-millisecond ties the same way. - Every read now takes the same lock as writes. The SQLCipher connection is shared by the UI, network, watchdog and presence threads (
check_same_thread=False); the lock is now anRLock.
Connection handling
- Inbound connections whose handshake is still running now count towards the global session cap, so a burst of simultaneous connections can no longer all pass the pre-handshake check.
_handle_inboundis split into_handle_inboundand_accept_inbound. drop_contactcallsshutdown()on the socket before closing it.- Parameters, variables and
pending_ackskeys that hold the contact id (fingerprint, or fingerprint +-onion) are renamed fromcontact_fingerprinttocontact_id. No behaviour change. The database column andStorageparameters keep the old name (changing the column would need a schema migration).
Protocol validation
validate_packetnow checks the exact decoded size ofidentity_pub(32 bytes),session_nonce(16),nonce(12),ciphertext(at least the 16-byte GCM tag) anddh(32). Malformed packets are rejected at the protocol layer instead of failing later in the handshake or decryption.add_paddingraisesInvalidPacketif a packet exceeds the padding block, instead of silently producing a frame the peer would refuse.unb64raisesValueErrorfor non-ASCII input.
UI
- Contact names are escaped in the contact list and in the chat log, so a name such as
[admin]is shown literally instead of being parsed as Rich markup.
Installer
- Installs the latest stable release (resolved at run time) instead of a hard-coded version. A specific version can be requested with
REDOUBT_VERSION=X.Y.Z. - Icon and fonts are downloaded from the release tag, not from
main. All downloads are HTTPS-only. The AppImage is downloaded to a temporary name and moved into place only after verification, so a failed download never replaces a working installation. - The AppImage is verified against the release
SHA256SUMSwhen the release publishes it. A mismatch, a missing entry or a failure to fetch the file aborts the installation. If the release has noSHA256SUMS(404), the installer warns and continues, unlessREDOUBT_REQUIRE_CHECKSUM=1is set.
Configuration / testing
- Added
xfail_strict = trueinpyproject.toml. RELEASE_WORKFLOW.mdupdated.- Test suite fixes:
Peertest helper retries with a fresh port when binding fails withEADDRINUSE;--versiontest compares againstredoubt.__version__instead of a hard-coded string; strictxfailtest that documented thepending_acksrace is now a regular test; removed fixed sleeps from storage and byte-rate-limit tests;test_disable_core_dumpsnow runs in a subprocess.
Bug Fixes
Migration
- A wrong passphrase now raises
WrongPassphraseError(both anInvalidTagand aValueError). Before, the interactive loader reported it as a "System Error" because the text check on the error message never matched. - If some contacts, messages or pending messages cannot be decrypted during the database migration, their number is now logged and printed as a warning, with the path of the untouched original (
redoubt.db.pre-migration-backup). Backups were already created before migration; skipped records were previously only logged.
Compatibility
Full backward compatibility with 2.3.0
- No database schema change and no wire format change. Validation only enforces the sizes that Redoubt already uses for the fields listed above.
- Existing installations:
~/.redoubt,redoubt.logandsettings.jsonhave their permissions restricted on the next start. - Installer: with
install.sh, a release published withoutSHA256SUMSinstalls with a warning. PublishingSHA256SUMSwith each release (already described inRELEASE_WORKFLOW.md, but missing from v2.3.0) enables the verification.