Security release 2026.11.9 #338

Merged
jcoffey-dev merged 14 commits from hotfix/2026.11.9 into release/2026 2026-11-09 15:47:33 +00:00
Owner

The 12 fixes from #336, cherry-picked onto release/2026, and the version set to 2026.11.9. This becomes the 2026.11.9 security release.

Two picks needed changes for release/2026:

  • WebDAV tenant check: the test drops the directory-queries-off part, which needs #282 (27.1 only). The fix applied as is.
  • DNS: hand-ported. release/2026 has no MX set check (relay spec), so only the TXT/CAA part applies; the unit tests come along without the MX ones.

Plus one commit adding the modification notice to three files main had already marked.

Checked locally on the branch: fmt, fork checks, build, the workspace unit tests, and the imap, webdav, jmap, system, smtp, directory and automation suites pass. One smtp test (report_analyze) timed out once waiting for ingestion and passed three reruns alone.

The 12 fixes from #336, cherry-picked onto release/2026, and the version set to 2026.11.9. This becomes the 2026.11.9 security release. Two picks needed changes for release/2026: - WebDAV tenant check: the test drops the directory-queries-off part, which needs #282 (27.1 only). The fix applied as is. - DNS: hand-ported. release/2026 has no MX set check (relay spec), so only the TXT/CAA part applies; the unit tests come along without the MX ones. Plus one commit adding the modification notice to three files main had already marked. Checked locally on the branch: fmt, fork checks, build, the workspace unit tests, and the imap, webdav, jmap, system, smtp, directory and automation suites pass. One smtp test (report_analyze) timed out once waiting for ingestion and passed three reruns alone.
jcoffey-dev added 14 commits 2026-11-09 15:37:07 +00:00
JMAP Mailbox/set only trimmed a new name, so a name could hold CR, LF or
other control characters. IMAP sessions that enabled IMAP4rev2 or
UTF8=ACCEPT wrote that name into LIST, LSUB, STATUS and ACL responses as
a quoted string with the CR/LF left raw, so the rest of the name was read
as a new server response. Any signed-in user could forge responses such
as "* 1 EXPUNGE" in their own mail app and, through a shared folder, in
the IMAP sessions of everyone the folder is shared with. IMAP CREATE and
RENAME accepted the same names when sent as a literal.

JMAP Mailbox/set, IMAP CREATE and RENAME, and folders created by a Sieve
fileinto now refuse names containing control characters. A quoted string
that holds CR or LF, such as a name stored before this change, is now
sent as a literal, so it can never end a response line.

Test: on main a mailbox named "x\r\n* 1 EXPUNGE" was created over JMAP
and an IMAP4rev2 LIST returned a separate "* 1 EXPUNGE" line, and the
LIST writer put the raw CR/LF inside quotes. Now the JMAP create is
refused, CREATE and RENAME answer NO, and the writer sends a literal.
The live delivery test took its target from the request path,
percent-decoded it and sent it in RCPT TO with no checks. A target with
an encoded CR/LF added SMTP commands of the caller's choosing to the
session with the remote MX, sent from the server's own IP address, and
a target with spaces or angle brackets could add RCPT TO parameters.
Anyone holding the live delivery test permission, such as a delegated
admin or helpdesk role, could do this against any mail server.

The target must now be a valid email address or domain name with no
control characters, spaces or angle brackets; anything else is refused
with 400 before a lookup or connection is made. The domain used for the
MX lookup and the MTA-STS fetch is limited to letters, digits, hyphens,
underscores and dots, with international names converted to ASCII.

Test: on main the target parser accepted
"[email protected]>\r\nRSET\r\nMAIL FROM:<[email protected]". Now it, and
targets with CR, LF, NUL, spaces, angle brackets, ports or paths, are
refused, while plain addresses and domains are still accepted.
Email/set allowed a keyword change when the user held the right to
modify messages on any one of the message's mailboxes. Keywords belong
to the message, not the mailbox, so a user a single mailbox was shared
with could flag, mark read or set $deleted on a message the owner also
keeps in a mailbox the user has no rights on (RFC 8621 asks for the
right on all of them). Setting or clearing $deleted also needed no
right to remove messages, so the owner's client could expunge a message
the user wasn't allowed to delete.

On a shared account, a keyword change now needs the right to modify
messages on every mailbox the message is in, before and after the
update, and a change to $deleted also needs the right to remove
messages on each of them. Otherwise the update is refused as forbidden,
as before.

Test: with rights on Inbox, setting $flagged on a message that is also
in Trash, and setting $deleted without the right to remove messages,
both succeeded on main and are now forbidden; $flagged on an Inbox-only
message still works.
With directory queries on, PROPFIND on another account's principal
(/dav/pal/<address>/) answered for any account on the server. The
principal listing and JMAP Principal/get only show accounts in the
caller's own tenant, but this path had no tenant check, so a user in
one tenant could read the name, addresses and home sets of an account
in another tenant by asking for it by address.

Reading another account's principal through the directory now needs
that account to be in the caller's tenant; otherwise the response is
403 for that principal, as it already is with directory queries off.
Accounts the caller has access to (its own, its groups, shares) and
callers outside any tenant are unchanged.

Test: with directory queries on, a user in tenant T read the display
name of a user in tenant U on main and now gets 403; reading a user in
its own tenant still works.
A */query request with "limit": 0 returned every matching id instead of
none, because the server treats a limit of 0 internally as "no limit".
Any signed-in user could use it to get the whole result set of a query
in one response, such as Email/query over a large mailbox, past the
server's maximum query results. Log/query read every log line the same
way.

A limit of 0 now returns an empty ids list, as RFC 8620 asks. The total
is still counted when calculateTotal is set, and an anchor is still
looked for, so a missing anchor is still an error.

Test: on main the query builder returned all ten ids for a limit of 0
(and the log reader returned every entry). Now both return none, while
no limit and a limit of 4 still return ten and four ids.
With onSuccessDestroyOriginal, Email/copy queued every original for
destruction, including those whose copy failed because the destination
was over quota, already had the message, or the message wasn't found.
The user's own move between accounts could lose mail: the copy was
refused and the original was destroyed anyway.

Only an original whose copy succeeded is now destroyed. A failed copy
reports its error in notCreated and leaves the original in place.

Test: copying a message into an account that already holds it failed
with alreadyExists and, on main, still destroyed the original. Now the
original is still there.
FileNode/set with onExists "replace" queued the existing file or folder
with the same name for destruction as soon as it found the clash, before
the remaining checks on the create or update ran. If one of them then
refused the write (sharing with an unknown account, missing rights,
over quota), the new node wasn't written but the existing one was
destroyed anyway. The user's own request could lose their file. The
destroy still needed the right to delete, so this didn't bypass rights.

The existing node is now queued for destruction only once the create or
update that replaces it has been accepted.

Test: a create and an update with onExists "replace" that were refused
for sharing with an account that doesn't exist destroyed both existing
files on main. Now both are still there.
The token introspection endpoint answered with the username of whoever
called it, not of the account the token belongs to. A resource server
using RFC 7662 introspection to find out who a bearer token belongs to
was told it belonged to the introspecting party. It also reported any
valid token as an active bearer token, including refresh tokens and
the tokens behind calendar RSVP links and live tracing, metrics and
delivery views, which are not meant to be presented as bearer tokens.

Introspection now reports the token owner's username, and only an
access token is active. Any other token, or one whose account no longer
exists, is reported as inactive. The caller still has to authenticate.

Test: on main a refresh token introspected as active, and another
user's access token introspected with the caller's username. Now the
refresh token is inactive and the access token names its owner.
When a BDAT chunk would take the message past the size limit, the
server answered 552 and dropped what it had received so far, but kept
the sender and recipients. A client that pipelined more chunks after
the refused one could finish with BDAT LAST, and the server queued
whatever came after the refused chunk as the whole message and
answered 250. Anyone able to reach RCPT TO could get a truncated
message, often without its headers, delivered to local recipients or
relayed.

A refused chunk now resets the transaction. Chunks already in the
pipeline are refused with 503 and discarded, and nothing is queued
until the client starts again with MAIL FROM.

Test: pipelining a 10-byte chunk, a chunk over the limit and a small
BDAT LAST got 250, 552 and "250 Message queued" on main. Now the last
chunk gets 503 5.5.1 and no message is queued.
With more than one queue quota keyed on the recipient domain, only the
first was checked. The quotas shared one list of domains already
counted, so once the first quota had seen a domain, every later quota
skipped it, whether or not the first quota applied to it. A sender
could fill the queue for a domain past the limit an operator set for
it in any quota but the first.

Each quota now keeps its own list, so every quota checks every
recipient domain once.

Test: with a second domain quota allowing one queued message to
quota.net, the second message to [email protected] was queued with 250 on
main. Now it gets 452 4.3.1, and the first quota still applies.
Before publishing a TXT or CAA record at a name it shares with others,
such as SPF at the domain's apex, the DNS task reads the records there
so it can keep the ones it doesn't own. When that read failed (a
timeout, a provider error), the task wrote its own records anyway, and
the write replaced the whole set: site verifications, other services'
TXT records and CAA records at that name were deleted from the zone.
Every error also failed the task for good, so a passing provider outage
left the records unpublished.

Now a failed read leaves that name as it is and the task reports it. A
provider that can't list records at all is still written to as before.
Errors that may pass (the network, a timeout, HTTP 5xx or 429, a DNS
server failure) make the task try again later; refused credentials, a
zone the provider doesn't have and other refused requests still fail it
for good.

Test: with a provider whose list fails, publishing SPF at the apex left
only the new SPF record, and a timeout or HTTP 503 failed the task for
good. Now the name is left as it was, and only the errors that may pass
are tried again.

Backport to release/2026, which has no MX set check (relay spec), so
only the TXT and CAA part applies.
JMAP shows anyone a calendar is shared with only the time of a private
or confidential event, and only the owners and themselves among the
attendees of an event that hides them, unless they may change it.
CalDAV had none of this. A sharee with read access got the full event,
with its title, description, location, alarms and every attendee,
through GET, calendar-multiget, calendar-query, PROPFIND and
sync-collection, and a calendar-query could match a private event on
its title. A read-only sharee could also COPY a private event, or the
whole calendar, into its own account and read everything there.

CalDAV now applies the same rules as JMAP for anyone but the calendar's
owner. Calendar data, the size reported and what a calendar-query
matches all come from what the reader may see; the ETag stays the
stored one. A private or confidential event can't be copied or moved
to another account by a sharee, nor can a calendar holding one, and an
event that hides its attendees leaves without those the sharee may not
see. A sharee can't PUT over an event it doesn't see in full, so the
reduced copy can't be written back over the original; such a sharee
gets 403. Free-busy is unchanged, and owners see everything as before.

Test: on main a read-only sharee got the title of a private and of a
confidential event and a hidden attendee from GET, multiget,
calendar-query, PROPFIND and sync-collection, matched the private
event on its title, and copied it out (201). Now it gets the time
only, no hidden attendee, no match, and 403 for the copies; a sharee
with write access sees all attendees but gets 403 for a PUT over the
private event, which keeps its details.
Mark update.rs, diagnose.rs and the webdav tests as modified for INBUXA
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 9m26s
fcdb85dc9c
jcoffey-dev merged commit 8844ccffcc into release/2026 2026-11-09 15:47:33 +00:00
jcoffey-dev deleted branch hotfix/2026.11.9 2026-11-09 15:47:33 +00:00
Sign in to join this conversation.