Skip to content

[SECURITY] maddy 0.9.8

Latest

Choose a tag to compare

@foxcpp foxcpp released this 19 Nov 20:31
· 1 commit to master since this release
Immutable release. Only release title and notes can be modified.
v0.9.8
7dce54f

Summary

This release includes fixes for two reported security issues: IMAP
parsing now limits command size and nesting depth, and LDAP
authentication cleanup avoids a nil-pointer panic in a connection error
path.

Operators using IMAP or LDAP authentication should upgrade to receive
these fixes.

IMAP behavior is corrected for read-only EXAMINE sessions and RENAME INBOX, and searches using SINCE or ON now include messages from the
specified day. The release also adds optional SMTP reverse-DNS lookup
control, bounded command execution for check.command, and
platform-specific default directories.

Security

The IMAP parser now rejects excessively long commands and deeply nested
lists, limiting resource use while parsing client input. Previously, a
client able to reach an IMAP listener could send input without these
parser bounds.

Affects configurations exposing an IMAP endpoint to clients. No
additional configuration is required for the parser limits.

If rebinding a pooled LDAP connection failed, cleanup could clear the
shared connection and then dereference it while trying to close it
again, panicking the process. Cleanup now returns after invalidating the
connection.

Affects configurations using auth.ldap; the problematic path requires
a rebind failure while returning a connection to the pool.

Bug fixes

  • endpoint/imap: Do not expunge a read-only mailbox on CLOSE, and
    reject MOVE and UID MOVE on a read-only selection (#906).
  • endpoint/imap: After RENAME INBOX, make the new empty INBOX
    visible in the same session while preserving messages in the renamed
    mailbox (#907).
  • endpoint/imap: Include messages dated on the specified day in SINCE
    and ON searches (#887).
  • endpoint/imap: Wait for active connections to finish during shutdown,
    avoiding a data race (#886).
  • endpoint/smtp: Snapshot connection metadata per message so
    asynchronous delivery does not race with changes to session state
    (#899).
  • auth/pass_table: Return an error instead of panicking on malformed
    Argon2 hashes (#888) (PR #891, thanks @kabeer7121).
  • auth: Apply auth_map only once during SASL LOGIN authentication.
  • target/queue: Preserve enhanced SMTP status codes when converting
    delivery errors.
  • target/remote: Do not pool a connection used when a TLS policy
    override bypassed MX authentication policies.
  • check/milter: Accept IPv4- and IPv6-specific TCP endpoints, and reject
    TLS endpoints explicitly because the milter client does not support
    TLS.
  • DMARC and address checks: Decode RFC 2047 display names in address
    lists, including supported legacy character sets (#894).

Improvements

  • endpoint/smtp: Add rdns_lookup to disable client reverse-DNS
    lookups. It defaults to yes; setting it to no skips PTR lookups
    and dependent checks (#150) (PR #889, thanks @kabeer7121).
  • check/command: Add timeout and interrupt_timeout controls for
    external commands. Both default to one minute; a timed-out command
    receives SIGINT and is killed if it does not stop within the interrupt
    timeout.
  • imap.filter.command: Add a one-minute default command timeout and
    close message-body readers after filtering.
  • config: Use platform-specific default directories on Windows, macOS
    and BSD. Windows uses %ProgramData%\maddy for configuration,
    separate data and run directories, and %ProgramFiles%\maddy for
    libexec. macOS and BSD use /var/run/maddy for runtime files and
    /usr/lib/maddy for libexec (#290) (PR #900, thanks @AdamMagued).
  • config: Support tcp4, tcp6, fd and fdname endpoint addresses,
    including TLS modifiers for inherited file descriptors.
  • auth.pass_table: Log specific diagnostics when a credentials table has
    no entry for a username, while keeping client-facing authentication
    errors generic (#649) (PR #890, thanks @mvanhorn).
  • table/regexp: Accept the documented expand_placeholders directive
    while retaining the old expand_replaceholders spelling with a
    deprecation warning (#896) (PR #902, thanks @troioi-vn).

Documentation

  • Document configuration macros and variable expansion syntax (#335).
  • Add documentation for the Dovecot SASL endpoint (#438).
  • Correct the +tag stripping example for table.chain (#896) (PR
    #898, thanks @troioi-vn).

Misc

  • tests: Reserve test ports with shared listening sockets to avoid port
    collisions
  • tests: Use Parallel for all integration tests and fix encountered data
    races in test code.