Repository navigation
fix(daemon): honour the leading-comma separator form in auth users and gid - #7345
Merged
Merged
Conversation
…d gid `auth users = ,@Domain admins` names ONE group whose name contains a space. oc split that value on commas AND THEN on whitespace, unconditionally, so it became two entries: `@domain` and `admins`. Both halves are wrong at once, and in opposite directions - the rule the operator wrote never matches, and a rule they never wrote starts matching. A false DENY and a false ALLOW from a single config line. upstream's `conf_strtok()` (util1.c:932) has TWO modes, selected by the value itself: if (*str == ',') /* after leading whitespace */ commas_only = 1; /* split on ',' alone, trim each token */ else strtok(str, " ,\t\r\n") /* split on whitespace OR commas */ A leading comma opts the whole list into comma-only splitting, which is how an entry gets to contain a space. Without one, whitespace still separates - so this is additive, not a change to the common form. SCOPE - upstream calls conf_strtok() at exactly three sites covering two directives, and both are fixed here: | directive | upstream site | oc site | verdict | |------------------|-----------------------------|-------------------|-----------| | `auth users` | authenticate.c:356 | parse_auth_user_list | DIVERGENT | | `gid` | clientserver.c:844, :861 | parse_gid_setting | DIVERGENT | | `hosts allow` | access.c:259 plain strtok | - | correct as-is | | `hosts deny` | access.c:259 plain strtok | - | correct as-is | | `refuse options` | not a conf_strtok directive | parse_dedup_list | out of scope | `hosts allow`/`hosts deny` are the trap: they read as the same shape of directive, but upstream splits them with a plain `strtok(list2, " ,\t")` and has no comma-only mode. Widening the new helper to cover them would introduce a divergence, not remove one. `parse_dedup_list`'s only caller is `parse_refuse_option_list`. Both facts are now written at the code so the next reader does not "finish the job" and break the two that are already right. The two divergent sites now share one `conf_split()` helper, mirroring upstream's own structure - one splitter, two consumers - rather than duplicating the mode test. Verification: 32/32 targeted tests green, 8 of them new. Mutation - disabling the leading-comma mode kills 4 of the 32, and 28 + 4 = 32 reconciles against the run count, so no fail-fast truncation is hiding kills. fmt clean; clippy -D warnings clean on the crate. The full `-p daemon` run could NOT be completed locally and is left to CI. Two attempts died on ENFILE (`Too many open files in system`, os error 23) and a third on SIGABRT. That is a host condition, not this change: `kern.num_files` sits at 195267 of 245760 at rest, and `lsof` attributes ~91000 of those to wedged `daemon-<hash>` nextest binaries from OTHER clones, aged 8 and 20 days (one holds 54595 fds by itself). They were left running rather than killed, since they belong to other sessions. A local suite failure on this host must be checked against `sysctl kern.num_files` before it is read as a code failure.
oferchen
added a commit
that referenced
this pull request
Aug 21, 2026
…te (#7423) The changelog had not been touched since 2026-08-13 (#7279) while ~140 PRs merged, and several factual claims in README/SECURITY had drifted far enough to mislead an operator. Each correction below was verified against the tree, not inferred. CHANGELOG: fill in Unreleased for everything merged since #7279, grouped by Security / Added / Changed / Fixed / Testing and CI / Documentation. SECURITY: - The 3.5.0 divergence figure said 133. The committed expect manifests say 43 + 62 on the two full-corpus legs (64 distinct) and 89 across all four. Replaced the estimate with the per-leg table and the manifest mechanism. - The CI paragraph described the 3.5.0 suite as a separate nightly job. It is now the required gate, four legs, on every pull request. - CVE-2026-53791: the placeholder-peer-address prerequisite is fixed (#7303), not pending. CVE-2026-70452, -70463 and -70453 are fixed (#7314, #7345, #7293) and were still listed as under audit. - The new-defensive-surface paragraph listed all eight 3.5.0 additions as being adopted; four have shipped and two directives have not. - The fuzz list named 24 targets including "rsyncd_conf", which does not exist in fuzz/fuzz_targets. There are 26; added the three real ones that were missing. - The buffer-pool hardening note claimed recycle_buffer guards buf_id with a debug assertion and warned against exposing io_uring to untrusted input. The check is a real release-mode bound returning BufferIdOutOfRange before any state is mutated, so the warning was false. README: - Status and interop sections listed 3.5.0 as built-and-cached ahead of gating; run_interop.sh has it in the gating version list, and the protocol table row still said "not yet gating". - Added the current 3.5.0 testsuite outcomes rather than only describing the mechanism, so the 64 open divergences are stated plainly. - The CVE line stopped at the 2024 batch; the 3.4.3 batch is closed and 3.5.0 is partially closed and tracked. - The spill CLI flags were described as planned for STN-11; both exist. - The OC_RSYNC_BUFFER_POOL variables were attributed to the io_uring registered pool. All three live in crates/engine/src/local_copy/ buffer_pool/ and tune the engine pool; the io_uring pool is a different, static one. - The bgid note advised monitoring for exhaustion that measurement shows does not occur. - Fixed a broken link: compressed_token/zstd_codec is a directory. - Listed the shipped 3.5.0 option surface in the feature table.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…d gid (#7345) `auth users = ,@Domain admins` names ONE group whose name contains a space. oc split that value on commas AND THEN on whitespace, unconditionally, so it became two entries: `@domain` and `admins`. Both halves are wrong at once, and in opposite directions - the rule the operator wrote never matches, and a rule they never wrote starts matching. A false DENY and a false ALLOW from a single config line. upstream's `conf_strtok()` (util1.c:932) has TWO modes, selected by the value itself: if (*str == ',') /* after leading whitespace */ commas_only = 1; /* split on ',' alone, trim each token */ else strtok(str, " ,\t\r\n") /* split on whitespace OR commas */ A leading comma opts the whole list into comma-only splitting, which is how an entry gets to contain a space. Without one, whitespace still separates - so this is additive, not a change to the common form. SCOPE - upstream calls conf_strtok() at exactly three sites covering two directives, and both are fixed here: | directive | upstream site | oc site | verdict | |------------------|-----------------------------|-------------------|-----------| | `auth users` | authenticate.c:356 | parse_auth_user_list | DIVERGENT | | `gid` | clientserver.c:844, :861 | parse_gid_setting | DIVERGENT | | `hosts allow` | access.c:259 plain strtok | - | correct as-is | | `hosts deny` | access.c:259 plain strtok | - | correct as-is | | `refuse options` | not a conf_strtok directive | parse_dedup_list | out of scope | `hosts allow`/`hosts deny` are the trap: they read as the same shape of directive, but upstream splits them with a plain `strtok(list2, " ,\t")` and has no comma-only mode. Widening the new helper to cover them would introduce a divergence, not remove one. `parse_dedup_list`'s only caller is `parse_refuse_option_list`. Both facts are now written at the code so the next reader does not "finish the job" and break the two that are already right. The two divergent sites now share one `conf_split()` helper, mirroring upstream's own structure - one splitter, two consumers - rather than duplicating the mode test. Verification: 32/32 targeted tests green, 8 of them new. Mutation - disabling the leading-comma mode kills 4 of the 32, and 28 + 4 = 32 reconciles against the run count, so no fail-fast truncation is hiding kills. fmt clean; clippy -D warnings clean on the crate. The full `-p daemon` run could NOT be completed locally and is left to CI. Two attempts died on ENFILE (`Too many open files in system`, os error 23) and a third on SIGABRT. That is a host condition, not this change: `kern.num_files` sits at 195267 of 245760 at rest, and `lsof` attributes ~91000 of those to wedged `daemon-<hash>` nextest binaries from OTHER clones, aged 8 and 20 days (one holds 54595 fds by itself). They were left running rather than killed, since they belong to other sessions. A local suite failure on this host must be checked against `sysctl kern.num_files` before it is read as a code failure.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…te (#7423) The changelog had not been touched since 2026-08-13 (#7279) while ~140 PRs merged, and several factual claims in README/SECURITY had drifted far enough to mislead an operator. Each correction below was verified against the tree, not inferred. CHANGELOG: fill in Unreleased for everything merged since #7279, grouped by Security / Added / Changed / Fixed / Testing and CI / Documentation. SECURITY: - The 3.5.0 divergence figure said 133. The committed expect manifests say 43 + 62 on the two full-corpus legs (64 distinct) and 89 across all four. Replaced the estimate with the per-leg table and the manifest mechanism. - The CI paragraph described the 3.5.0 suite as a separate nightly job. It is now the required gate, four legs, on every pull request. - CVE-2026-53791: the placeholder-peer-address prerequisite is fixed (#7303), not pending. CVE-2026-70452, -70463 and -70453 are fixed (#7314, #7345, #7293) and were still listed as under audit. - The new-defensive-surface paragraph listed all eight 3.5.0 additions as being adopted; four have shipped and two directives have not. - The fuzz list named 24 targets including "rsyncd_conf", which does not exist in fuzz/fuzz_targets. There are 26; added the three real ones that were missing. - The buffer-pool hardening note claimed recycle_buffer guards buf_id with a debug assertion and warned against exposing io_uring to untrusted input. The check is a real release-mode bound returning BufferIdOutOfRange before any state is mutated, so the warning was false. README: - Status and interop sections listed 3.5.0 as built-and-cached ahead of gating; run_interop.sh has it in the gating version list, and the protocol table row still said "not yet gating". - Added the current 3.5.0 testsuite outcomes rather than only describing the mechanism, so the 64 open divergences are stated plainly. - The CVE line stopped at the 2024 batch; the 3.4.3 batch is closed and 3.5.0 is partially closed and tracked. - The spill CLI flags were described as planned for STN-11; both exist. - The OC_RSYNC_BUFFER_POOL variables were attributed to the io_uring registered pool. All three live in crates/engine/src/local_copy/ buffer_pool/ and tune the engine pool; the io_uring pool is a different, static one. - The bgid note advised monitoring for exhaustion that measurement shows does not occur. - Fixed a broken link: compressed_token/zstd_codec is a directory. - Listed the shipped 3.5.0 option surface in the feature table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(daemon): honour the leading-comma separator form in auth users and gid
auth users = ,@domain adminsnames ONE group whose name contains a space.oc split that value on commas AND THEN on whitespace, unconditionally, so it
became two entries:
@domainandadmins.Both halves are wrong at once, and in opposite directions - the rule the
operator wrote never matches, and a rule they never wrote starts matching. A
false DENY and a false ALLOW from a single config line.
upstream's
conf_strtok()(util1.c:932) has TWO modes, selected by the valueitself:
A leading comma opts the whole list into comma-only splitting, which is how an
entry gets to contain a space. Without one, whitespace still separates - so
this is additive, not a change to the common form.
SCOPE - upstream calls conf_strtok() at exactly three sites covering two
directives, and both are fixed here:
auth usersgidhosts allowhosts denyrefuse optionshosts allow/hosts denyare the trap: they read as the same shape ofdirective, but upstream splits them with a plain
strtok(list2, " ,\t")and hasno comma-only mode. Widening the new helper to cover them would introduce a
divergence, not remove one.
parse_dedup_list's only caller isparse_refuse_option_list. Both facts are now written at the code so the nextreader does not "finish the job" and break the two that are already right.
The two divergent sites now share one
conf_split()helper, mirroringupstream's own structure - one splitter, two consumers - rather than
duplicating the mode test.
Verification: 32/32 targeted tests green, 8 of them new. Mutation - disabling
the leading-comma mode kills 4 of the 32, and 28 + 4 = 32 reconciles against
the run count, so no fail-fast truncation is hiding kills. fmt clean; clippy
-D warnings clean on the crate.
The full
-p daemonrun could NOT be completed locally and is left to CI. Twoattempts died on ENFILE (
Too many open files in system, os error 23) and athird on SIGABRT. That is a host condition, not this change:
kern.num_filessits at 195267 of 245760 at rest, and
lsofattributes ~91000 of those towedged
daemon-<hash>nextest binaries from OTHER clones, aged 8 and 20 days(one holds 54595 fds by itself). They were left running rather than killed,
since they belong to other sessions. A local suite failure on this host must be
checked against
sysctl kern.num_filesbefore it is read as a code failure.