Skip to content

fix(linux): TLS file checks, connect errors and keyring wording - #3467

Merged
datlechin merged 21 commits into
linuxfrom
fix/linux-connect-security
Oct 17, 2026
Merged

datlechin merged 21 commits into
linuxfrom
fix/linux-connect-security

Conversation

@datlechin

Copy link
Copy Markdown
Member
  • TLS: a CA file is taken only with Verify full. A saved or imported Require plus CA file loads as Verify full, as libpq and the mysql client treat it. New conformance case require_with_ca_file_is_refused on all four engines.
  • TLS files: CA, certificate and key are read only when regular and at most 1 MiB, parsed from bytes, set up on the blocking pool (tablepro_net::tls::set_up_off_runtime).
  • Connection export is written 0600 (FileCreateFlags::PRIVATE).
  • Import: an entry whose name is taken gets a suffix, also for duplicates within one file; added entries drop last_opened_at.
  • PostgreSQL: a refused client certificate is TlsSetupError::ClientIdentity, other trust store failures are Other. SQLSTATE 28000 (pg_hba) is DriverError::LoginRefused, not a wrong password, with no Enter Password.
  • New Connection writes over only the entry the dialog was reopened on. Replaces the test that pinned the overwrite with a_connect_from_new_connection_never_writes_over_a_saved_entry.
  • Set TLS Server Name is offered only where the route shows that row.
  • MySQL TLS off: the Disable subtitle, docs/drivers/mysql.md and ADR 0009 say the password can travel in clear text. sqlx-mysql 0.9 has no switch to refuse it.
  • Wording: session-lost banner shows the driver message; Cancel is the default on a first host key prompt; passphrase prompts; keyring save failures; secret portal message; statement timeouts; import file errors; "Could Not Save the Connection" after a good connect.
  • deny.toml: drop the zip@8.6.0 yanked entry, since crates.io no longer lists 8.6.0 as yanked; the three RUSTSEC ignores stay.
  • secret_retry window test updated for the new keyring toast text.

Require checked no certificate and dropped the file, where libpq and the mysql client verify against it. A saved Require with a CA file now loads as Verify full, so it fails closed instead of connecting unchecked.
A CA or key path of /dev/zero filled memory and a FIFO held a runtime worker forever. PostgreSQL, MySQL and SQL Server now build their TLS setup on the blocking pool.
Only a client certificate rustls refused is ClientIdentityInvalid now; tablepro-net reports it as TlsSetupError::ClientIdentity.
SQLSTATE 28000 is now DriverError::LoginRefused: it still parks the session, but the app words it as a refused login and offers no Enter Password.
Every imported entry now gets a suffix when another entry holds its name, and an added one drops the file's last-opened time.
MySQL over a direct route hides the server name row, so a name mismatch there offered a button that opened a row nobody could see.
A new entry that reached the same host, user and database replaced the saved one, its name and its read-only switch included. Only the entry the dialog was reopened on is written over now. The test that pinned the old match is replaced.
With TLS off an active attacker can ask sqlx-mysql 0.9 for mysql_clear_password on the first handshake, and the in-band RSA key is unauthenticated. sqlx has no option to refuse either, so the docs and the mode's subtitle now say so.
The window test that matched the old toast text now matches the new one.
…curity

# Conflicts:
#	linux/crates/app/src/ui/session_window/connect_failed_page.rs
Signed-off-by: Dat Ngo Quoc <datlechin@gmail.com>
@datlechin
datlechin merged commit b2427d3 into linux Oct 17, 2026
6 checks passed
@datlechin
datlechin deleted the fix/linux-connect-security branch October 17, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant