Skip to content

fix: close connection, auth and transaction gaps - #458

Merged
kacy merged 7 commits into
mainfrom
fix/connection-gaps
Nov 14, 2026
Merged

kacy merged 7 commits into
mainfrom
fix/connection-gaps

Conversation

@kacy

@kacy kacy commented Nov 14, 2026

Copy link
Copy Markdown
Owner

The open medium items from the audit for connections, auth and gRPC limits. One commit per fix:

  • AUTH in a batch: a read batch holding AUTH ran its frames through dispatch::process, which skips the transaction handler. With AUTH, MULTI, SET, EXEC in one write, MULTI was refused as nested, SET ran at once and EXEC failed. Inside an open MULTI, commands stopped queueing. They now go through handle_frame_with_tx
  • ACL SETUSER: rules apply to a copy that is stored only when all of them succeed. An invalid rule left the earlier ones applied, and could create the user
  • transaction size: queued commands and watched keys may hold at most max_command_memory (128 MiB), since a transaction counts as one command. Past it, the command is refused, EXEC returns EXECABORT, and WATCH returns an error
  • CONFIG REWRITE: the temp file is created with mode 0600, synced, then given the original file's permissions before the rename. It got the default umask permissions, usually 0644, and the file can hold requirepass
  • gRPC and maxclients: the gRPC listener from fix: serve gRPC over TLS when tls-port is set #457 now serves plaintext too, and takes a place from the semaphore RESP connections use. It sets TCP_NODELAY and a 60 s keepalive, which tonic's serve() did before

Each fix has a test: the AUTH batch (fails on main), ACL atomicity, a 132 MiB transaction, config permissions, and gRPC refused while a RESP client holds the only place.

@kacy
kacy merged commit b6be6fb into main Nov 14, 2026
12 checks passed
@kacy
kacy deleted the fix/connection-gaps branch November 14, 2026 18:55
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