Skip to content

Fix cluster AUX-field control-character and delimiter injection - #3848

Merged
ranshid merged 8 commits into
valkey-io:unstablefrom
eifrah-aws:security-fix-cluster-aux-injection
Jun 3, 2026
Merged

ranshid merged 8 commits into
valkey-io:unstablefrom
eifrah-aws:security-fix-cluster-aux-injection

Conversation

@eifrah-aws

Copy link
Copy Markdown
Contributor

Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F) and format-significant delimiters (comma, equals, quotes, backslash, space) that could corrupt nodes.conf parsing or enable injection of crafted node entries on restart.

Additionally, add a validator for cluster-announce-ip which previously had no input validation, allowing arbitrary bytes to be persisted into the cluster config file.

Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt nodes.conf parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for cluster-announce-ip which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

Signed-off-by: Eran Ifrah <[email protected]>
@coderabbitai

coderabbitai Bot commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Harden AUX-field validation: tighten per-character checks in cluster code, add a validator for cluster-announce-ip enforcing length and character rules, and add unit tests validating rejection of control/delimiter characters and acceptance of valid IPv4/IPv6 values.

Changes

Cluster AUX Field Validation Hardening

Layer / File(s) Summary
Core validation function strengthening
src/cluster.c
isValidAuxChar() now takes unsigned char, explicitly rejects ASCII control characters (0x00–0x1F) and DEL (0x7F), and validates against an expanded invalid-character set that includes space and additional delimiters/special characters.
Config validator wiring
src/config.c
Adds isValidAnnouncedIp() which enforces NET_IP_STR_LEN and per-character validation via isValidAuxString(), and registers it as is_valid_fn for cluster-announce-ip while keeping updateClusterIp as the apply hook.
Validation test coverage
tests/unit/cluster/cluster-aux-field-validation.tcl
New unit tests assert CONFIG SET rejects control characters (newline, CR, NUL, tab) and disallowed delimiters (space, comma, equals) for cluster-announce-ip, verify acceptance of valid IPv4/IPv6 and stored values, add length-limit rejection and allowed-character/UTF‑8 acceptance tests, and add negative tests for cluster-announce-human-nodename.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main security-focused changes: hardening AUX-field validation to prevent control-character and delimiter injection attacks.
Description check ✅ Passed The description is directly related to the changeset, detailing both the hardening of isValidAuxChar() to reject control characters and delimiters, and the addition of cluster-announce-ip validation.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

❌ Provenance Check Alert

Potential code similarities detected with upstream repository.

  • 2026-05-27 13:55:32 [INFO] - matches redis/redis PR #15173 (similarity: 0.865, method: file_simhash+deep); file pairs: src/config.c <- src/config.c
  • 2026-05-27 13:55:32 [INFO] - matches redis/redis PR #15172 (similarity: 0.865, method: file_simhash+deep); file pairs: src/config.c <- src/config.c
  • 2026-05-27 13:55:32 [INFO] - matches redis/redis PR #15170 (similarity: 0.865, method: file_simhash+deep); file pairs: src/config.c <- src/config.c
  • 2026-05-27 13:55:32 [INFO] - matches redis/redis PR #15169 (similarity: 0.865, method: file_simhash+deep); file pairs: src/config.c <- src/config.c
  • 2026-05-27 13:55:32 [INFO] - matches redis/redis PR #15168 (similarity: 0.865, method: file_simhash+deep); file pairs: src/config.c <- src/config.c

This check was performed automatically by the Provenance Guard Action.

@eifrah-aws eifrah-aws mentioned this pull request May 27, 2026
@eifrah-aws

Copy link
Copy Markdown
Contributor Author

❌ Provenance Check Alert

This code exists in Redis 7.2.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tests/unit/cluster/cluster-aux-field-validation.tcl (1)

36-52: ⚡ Quick win

Add assertions for = and single-quote rejection.

Line 36 onward covers several newly blocked delimiters, but not = or ', which are also now rejected by isValidAuxChar. Add explicit CONFIG SET rejection tests for those characters to fully lock in the hardening behavior.

Proposed test additions
+    test "cluster-announce-ip rejects equals sign" {
+        assert_error "ERR CONFIG SET failed*cluster-announce-ip*invalid character*" {
+            R 0 CONFIG SET cluster-announce-ip "10.0.0.1=evil"
+        }
+    }
+
+    test "cluster-announce-ip rejects single quote" {
+        assert_error "ERR CONFIG SET failed*cluster-announce-ip*invalid character*" {
+            R 0 CONFIG SET cluster-announce-ip "10.0.0.1'evil"
+        }
+    }
As per coding guidelines `tests/**/*: Write integration tests for commands in tests/ directory`.

Also applies to: 64-74

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/cluster/cluster-aux-field-validation.tcl` around lines 36 - 52,
Add two new test cases in the same style as the existing tests
("cluster-announce-ip rejects comma", "cluster-announce-ip rejects backslash",
"cluster-announce-ip rejects double quote") to assert that CONFIG SET rejects
'=' and single-quote characters; use the same assert_error pattern and message
glob "ERR CONFIG SET failed*cluster-announce-ip*invalid character*" and the same
R 0 CONFIG SET invocation but with values "10.0.0.1=evil" and "10.0.0.1'evil"
(mirror the existing tests' structure so they appear adjacent to the current
tests for cluster-announce-ip).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/unit/cluster/cluster-aux-field-validation.tcl`:
- Around line 36-52: Add two new test cases in the same style as the existing
tests ("cluster-announce-ip rejects comma", "cluster-announce-ip rejects
backslash", "cluster-announce-ip rejects double quote") to assert that CONFIG
SET rejects '=' and single-quote characters; use the same assert_error pattern
and message glob "ERR CONFIG SET failed*cluster-announce-ip*invalid character*"
and the same R 0 CONFIG SET invocation but with values "10.0.0.1=evil" and
"10.0.0.1'evil" (mirror the existing tests' structure so they appear adjacent to
the current tests for cluster-announce-ip).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5cc2bd27-98f2-4b28-ba6e-9ee65a8d7a6c

📥 Commits

Reviewing files that changed from the base of the PR and between 8ee3fd7 and 0a57d0d.

📒 Files selected for processing (3)
  • src/cluster.c
  • src/config.c
  • tests/unit/cluster/cluster-aux-field-validation.tcl

@codecov

codecov Bot commented May 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.72%. Comparing base (7abe49a) to head (3453e6d).
⚠️ Report is 4 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #3848      +/-   ##
============================================
+ Coverage     76.65%   76.72%   +0.07%     
============================================
  Files           162      162              
  Lines         80694    80735      +41     
============================================
+ Hits          61857    61945      +88     
+ Misses        18837    18790      -47     
Files with missing lines Coverage Δ
src/cluster.c 92.42% <100.00%> (ø)
src/config.c 78.93% <100.00%> (+0.46%) ⬆️

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sarthakaggarwal97 sarthakaggarwal97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good to me. Minor comment.

Comment thread src/config.c Resolved

@ranshid ranshid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will be a breaking change. cluster-announce-human-nodename already used isValidAuxString (via isValidAnnouncedNodename). With this PR, several characters that were previously accepted in human nodenames are now rejected: ,, =, ", ', , space, and all control bytes

@zuiderkwast

Copy link
Copy Markdown
Contributor

I think this will be a breaking change. cluster-announce-human-nodename already used isValidAuxString (via isValidAnnouncedNodename). With this PR, several characters that were previously accepted in human nodenames are now rejected: ,, =, ", ', , space, and all control bytes

@ranshid As mentioned above, some of these characters corrupt nodes.conf, for example a space, because the columns in nodes.conf are space-separated, so it's already broken - nodes.conf can't be read after restart if e.g. numan-nodename contains a space.

Comment thread src/cluster.c Resolved
Comment thread src/cluster.c Resolved
- Make isValidAuxChar static with unsigned char parameter
- Add NET_IP_STR_LEN length check to isValidAnnouncedIp
- Reduce invalid_charset to only nodes.conf-breaking characters
- Add equals-sign rejection test, remove quote/backslash tests

Signed-off-by: Eran Ifrah <[email protected]>
@eifrah-aws
eifrah-aws requested review from ranshid and zuiderkwast May 31, 2026 16:08

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tests/unit/cluster/cluster-aux-field-validation.tcl (1)

48-56: ⚡ Quick win

Consider adding test coverage for the length limit.

The validator isValidAnnouncedIp (snippet 2) includes a separate check for length (>= NET_IP_STR_LEN) that produces a distinct error message. Adding a test case for an overly long IP string would exercise that validation path.

📝 Example test case
test "cluster-announce-ip rejects too-long value" {
    assert_error "ERR CONFIG SET failed*cluster-announce-ip*too long*" {
        R 0 CONFIG SET cluster-announce-ip [string repeat "a" 100]
    }
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/cluster/cluster-aux-field-validation.tcl` around lines 48 - 56,
Add a unit test that asserts setting cluster-announce-ip with a string longer
than NET_IP_STR_LEN triggers the specific "too long" validation error; update
tests/unit/cluster/cluster-aux-field-validation.tcl by adding a test (similar to
the provided example) that calls R 0 CONFIG SET cluster-announce-ip with a
repeated long string and uses assert_error to match the "ERR CONFIG SET
failed*cluster-announce-ip*too long*" message so the isValidAnnouncedIp
length-check path is exercised.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/unit/cluster/cluster-aux-field-validation.tcl`:
- Around line 48-56: Add a unit test that asserts setting cluster-announce-ip
with a string longer than NET_IP_STR_LEN triggers the specific "too long"
validation error; update tests/unit/cluster/cluster-aux-field-validation.tcl by
adding a test (similar to the provided example) that calls R 0 CONFIG SET
cluster-announce-ip with a repeated long string and uses assert_error to match
the "ERR CONFIG SET failed*cluster-announce-ip*too long*" message so the
isValidAnnouncedIp length-check path is exercised.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 92151e09-4ba8-482e-9f1c-c2a23c68616c

📥 Commits

Reviewing files that changed from the base of the PR and between 0a57d0d and 13d4e7f.

📒 Files selected for processing (3)
  • src/cluster.c
  • src/config.c
  • tests/unit/cluster/cluster-aux-field-validation.tcl
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/cluster.c
  • src/config.c

@ranshid ranshid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two follow-ups on the latest revision — a stale comment in src/cluster.c and a few test additions to lock in the deliberately-narrow charset and exercise the new length check.

Comment thread src/cluster.c Resolved
- cluster-announce-human-nodename rejects comma and equals (symmetry
  with the cluster-announce-ip cases, locks in breaking-change behavior)
- cluster-announce-ip length-limit test (exercises NET_IP_STR_LEN branch)
- Positive lock-in tests for deliberately-allowed chars (hyphen, dot,
  colon, slash, underscore) and high-byte UTF-8

Signed-off-by: Eran Ifrah <[email protected]>
@eifrah-aws
eifrah-aws requested a review from ranshid June 1, 2026 07:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/unit/cluster/cluster-aux-field-validation.tcl`:
- Around line 64-67: The test currently checks cluster-announce-ip with hyphen,
dot, colon, slash, and underscore but omits backslash, double-quote, and
single-quote; update the test case in cluster-announce-ip accepts hyphen, dot,
colon, slash, underscore to also assert that values containing backslash (\),
double-quote ("), and single-quote (') are accepted by CONFIG SET/GET (e.g., add
R 0 CONFIG SET cluster-announce-ip "host\\name", "host\"name", and "host'name"
style assertions) so the behavior of isValidAuxChar is fully covered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 876af3e8-a142-4ddd-aff9-e79dbf03dfe8

📥 Commits

Reviewing files that changed from the base of the PR and between 88ec9b5 and 072602d.

📒 Files selected for processing (1)
  • tests/unit/cluster/cluster-aux-field-validation.tcl

Signed-off-by: Eran Ifrah <[email protected]>

@ranshid ranshid left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approach is sound — centralizing on isValidAuxString covers cluster-announce-human-nodename and the AZ aux field through one chokepoint, and adding a validator to cluster-announce-ip closes a real gap (it had a NULL validator).

Comment thread src/cluster.c Resolved
Comment thread src/cluster.c Resolved
@ranshid ranshid moved this to To be backported in Valkey 7.2 Jun 1, 2026
sarthakaggarwal97 pushed a commit that referenced this pull request Jun 17, 2026
Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt `nodes.conf` parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for `cluster-announce-ip` which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

---------

Signed-off-by: Eran Ifrah <[email protected]>
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 7.2 Jun 17, 2026
sarthakaggarwal97 pushed a commit that referenced this pull request Jun 18, 2026
Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt `nodes.conf` parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for `cluster-announce-ip` which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

---------

Signed-off-by: Eran Ifrah <[email protected]>
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 8.0 Jun 18, 2026
valkeyrie-ops Bot pushed a commit that referenced this pull request Jun 21, 2026
Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt `nodes.conf` parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for `cluster-announce-ip` which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

---------

Signed-off-by: Eran Ifrah <[email protected]>
sarthakaggarwal97 added a commit to sarthakaggarwal97/valkey that referenced this pull request Jun 24, 2026
…ey-io#3848) (#348)

Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt `nodes.conf` parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for `cluster-announce-ip` which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

---------

Signed-off-by: Eran Ifrah <[email protected]>
Co-authored-by: eifrah-aws <[email protected]>
vansvan17 pushed a commit to vansvan17/valkey that referenced this pull request Jul 9, 2026
…ey-io#3848)

Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt `nodes.conf` parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for `cluster-announce-ip` which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

---------

Signed-off-by: Eran Ifrah <[email protected]>
Signed-off-by: Vanshika <[email protected]>
sarthakaggarwal97 pushed a commit that referenced this pull request Jul 14, 2026
Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt `nodes.conf` parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for `cluster-announce-ip` which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

---------

Signed-off-by: Eran Ifrah <[email protected]>
sarthakaggarwal97 pushed a commit that referenced this pull request Jul 14, 2026
Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt `nodes.conf` parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for `cluster-announce-ip` which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

---------

Signed-off-by: Eran Ifrah <[email protected]>
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 8.1 Jul 14, 2026
@valkeyrie-ops valkeyrie-ops Bot moved this from To be backported to Done in Valkey 9.0 Jul 14, 2026
alon-arenberg pushed a commit to alon-arenberg/valkey that referenced this pull request Jul 15, 2026
…ey-io#3848)

Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt `nodes.conf` parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for `cluster-announce-ip` which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

---------

Signed-off-by: Eran Ifrah <[email protected]>
Signed-off-by: Alon Arenberg <[email protected]>
alon-arenberg pushed a commit to alon-arenberg/valkey that referenced this pull request Jul 30, 2026
…ey-io#3848)

Harden isValidAuxChar() to reject control characters (0x00-0x1F, 0x7F)
and format-significant delimiters (comma, equals, quotes, backslash,
space) that could corrupt `nodes.conf` parsing or enable injection of
crafted node entries on restart.

Additionally, add a validator for `cluster-announce-ip` which previously
had no input validation, allowing arbitrary bytes to be persisted into
the cluster config file.

---------

Signed-off-by: Eran Ifrah <[email protected]>
Signed-off-by: Alon Arenberg <[email protected]>
sarthakaggarwal97 added a commit to sarthakaggarwal97/valkey that referenced this pull request Nov 17, 2026
…#3848)

Run the existing AUX-field injection regressions in the default Tcl suite.

This follow-up changes test coverage only. Server code and the existing
regression expectations are unchanged.

Backport-Source-PR: 3848
sarthakaggarwal97 added a commit that referenced this pull request Nov 18, 2026
Run the existing AUX-field injection regressions in the default Tcl suite.

This follow-up changes test coverage only. Server code and the existing
regression expectations are unchanged.

Backport-Source-PR: 3848
sarthakaggarwal97 added a commit that referenced this pull request Nov 18, 2026
> [!NOTE]
> **Opened ready despite 6 flagged items** (`force_ready` was set):
notes flagged low-confidence; release-safety guardrail overrode AI
triage; AI triaged PRs without release-notes (confirm include/exclude);
release lines contradict each other about a note; commits whose PR could
not be fetched; a distinct commit was dropped by a reused PR number.
Review the sections below and confirm before merging.

Cuts **7.2.16** onto release line `7.2`.

- Promotes the release notes into a dated section, bumps
`src/version.h`, and refreshes the running contributor list.
- Release notes computed over the range below
(`7.2.15..8991aee`):

```
mode: ga
source_ref: 7.2
target_branch: 7.2
base: 7.2.15 @ 20e068c
head: 8991aee @ 8991aee
```

### ⚠️ Notes to double-check

The generator flagged these notes low-confidence; confirm category and
wording before merging:

| PR | Category | Why flagged |
|----|----------|-------------|
| #5046 | Bug Fixes | explicit impact scope omitted: macOS |
| #4775 | Bug Fixes | could be Performance and Efficiency Improvements |
| #5246 | Bug Fixes | Schema-only change, server reply unchanged, so may
not be user-facing; PR also covers GET-PRIMARY-ADDR-BY-NAME, omitted
because the 7.2 commit title names only the MASTER command |

### Release-impact review

Code detected release-impact terms (availability, memory safety, data
integrity, access control, protocol, compatibility) in these PRs; this
forces review, it is not a severity classification.

The requested urgency is **SECURITY**. Confirm it and decide whether any
change needs a hand-authored **Security Fixes** entry:

⚠️ [#5178](#5178) names
**CVE-2021-32627**;
[#5163](#5163) names
**CVE-2021-32627**. A named CVE normally ships with `SECURITY` urgency
and a hand-authored **Security Fixes** entry; this holds the cut at any
other urgency.

<details>
<summary>26 PR(s) with impact signals</summary>

| PR | Title | Signal |
|----|-------|--------|
| [#5133](#5133) | Keep sds
lengths in size_t when comparing and caching keys | server crash,
assertion, or availability failure |
| [#5128](#5128) | Propagate
PFADD elements applied before an INVALIDOBJ error | data or
persisted-state corruption risk |
| [#5159](#5159) | Fill
unmatched postponed reply lengths left by a module | server crash,
assertion, or availability failure |
| [#4351](#4351) | Fix NULL
deref in usUntilEarliestTimer when all time events are deleted | server
crash, assertion, or availability failure |
| [#4665](#4665) | Check the
SORT destination that is actually written | security, access-control, or
injection hardening |
| [#5178](#5178) | Check XADD
element size before creating the stream | server crash, assertion, or
availability failure |
| [#5180](#5180) | Redact HELLO,
AUTH and MIGRATE credentials before validating arguments | security,
access-control, or injection hardening |
| [#4929](#4929) | Guard NULL
replica_primary_host in Sentinel INFO handling | server crash,
assertion, or availability failure |
| [#5087](#5087) | Treat key
specs that start past the last argument as matching no keys |
memory-safety risk |
| [#5187](#5187) | Defer freeing
the client that runs a replication role change | server crash,
assertion, or availability failure |
| [#5163](#5163) | Fix integer
overflow in _quicklistNodeAllowMerge size check | server crash,
assertion, or availability failure |
| [#5146](#5146) | Fix integer
overflow in SORT BY/GET pattern key substitution | undefined behavior or
unsafe arithmetic |
| [#5155](#5155) | Reject
ValkeyModule_Calloc requests whose nmemb * size overflows | server
crash, assertion, or availability failure |
| [#5124](#5124) | Reject sparse
HLLs that end in a truncated XZERO opcode | data or persisted-state
corruption risk |
| [#5138](#5138) | Fix
hllSparseSet aborting on SDS_TYPE_5 strings when deltalen is zero |
server crash, assertion, or availability failure |
| [#5184](#5184) | Treat a
replica with no known primary as owning no slots | server crash,
assertion, or availability failure |
| [#5126](#5126) | Reject a
+CONTINUE reply to PSYNC when there is no cached primary | server crash,
assertion, or availability failure |
| [#5137](#5137) | Ignore ping
extension values that nodes.conf cannot load | data or persisted-state
corruption risk |
| [#5065](#5065) | Cap the
length of inbound cluster bus packets | security, access-control, or
injection hardening |
| [#3848](#3848) | Fix cluster
AUX-field control-character and delimiter injection | data or
persisted-state corruption risk |
| [#3229](#3229) | Converge
divergent shard-id persisted in nodes.conf to master's shard… | data or
persisted-state corruption risk |
| [#5085](#5085) | Disconnect
default user subscribers to revoked channels on ACL LOAD | security,
access-control, or injection hardening |
| [#5349](#5349) | Treat a torn
annotation at the end of an AOF file as a short read | server crash,
assertion, or availability failure |
| [#5435](#5435) | Don't free
the client that is executing a command when a blocked client's
re-executed command evicts clients | memory-safety risk |
| [#5134](#5134) | Do not adopt
the MYSELF flag from a gossip entry | server crash, assertion, or
availability failure |
| [#5246](#5246) | Allow null in
SENTINEL GET-PRIMARY-ADDR-BY-NAME reply schema | wire-protocol or reply
correctness |

</details>

### Excluded from generated notes (listed under Security Fixes)

#5435 was supplied as a `--security-fix`, so the generated bullet(s) in
the normal categories were dropped to avoid double-listing. To keep the
notes consistent, it appears only under **Security Fixes**, where each
is reviewed as a factual security entry.

### ⚠️ Release-safety guardrail overrode AI triage

AI excluded these PRs (or gave no verdict) but their text names a
release-impact signal, so code forced them into the notes; confirm each
bullet, category, urgency, and security treatment:

| PR | Title | Guardrail reason |
|----|-------|------------------|
| [#5246](#5246) | Allow null in
SENTINEL GET-PRIMARY-ADDR-BY-NAME reply schema | ⚠️ release-safety
guardrail (wire-protocol or reply correctness; AI exclusion) |

### Triage summary

- 27 PR(s) triaged into the notes
- 16 PR(s) triaged out

Per-PR verdicts (with reasons) are in the run's `triage-verdicts`
artifact. To include a wrongly-dropped PR, label it `release-notes` and
re-cut.

### ⚠️ Commits whose PR could not be fetched

These range commits name a PR that could not be fetched and are
**absent** from the notes; note any user-facing change by hand:

| Commit | PR referenced |
|--------|---------------|
| `525e89e1b6b6` | #13071 |
| `e1c52f05a9fe` | #12930 |

### ⚠️ Commits dropped by a reused PR number

Two commits resolved to the same `(#N)`; the one below was **dropped**
and is absent from the notes, so note it by hand if it is a separate
user-facing change:

| Dropped commit | Subject | Reused # | Kept commit |
|----------------|---------|----------|-------------|
| `01d9ab7c7668` | Wait for SHUTDOWN to block before closing its client
(#5396) | #5396 | `8445a35ed8ab` |
| `2ae815571c82` | Run cluster packet regressions in the default suite
(#5065) | #5065 | `d8b0f7252d38` |
| `2a2f72749182` | Run replica-detach regressions in the default suite
(#5184) | #5184 | `d62ccbcc9b3b` |

### ⚠️ Release lines disagree about a note

Another release line already published a note for these PRs, but this
cut kept its own wording, so the entries will not read identically:

⚠️ #5133: the two lines contradict each other about the change itself,
not just its wording, which code must not resolve on its own. Read the
note on each line and settle which one is right before merging.

<details>
<summary>3 note(s) not reusing published wording</summary>

| PR | Other line | Why the wording was not reused |
|----|------------|--------------------------------|
| #5133 | `9.2` (Valkey 9.2.0-rc2) | ⚠️ `9.2` limits the change to
32-bit but this cut's note says no environment limit, so the lines
disagree about how far the change reaches |
| #5178 | `9.2` (Valkey 9.2.0-rc2) | the PR names a CVE, so its wording
is authored per release line by a human |
| #5163 | `9.2` (Valkey 9.2.0-rc2) | the PR names a CVE, so its wording
is authored per release line by a human |

</details>

### Wording carried from other release lines

A backported change is cut once per release line, and each cut words its
notes independently. To keep one commit from being described differently
per branch, a note whose source PR another line already published takes
that published wording verbatim (joined on the trailing `(#N)`, which
always names the original source PR). Only the text is reused; the
category, the `by @handle` credit, and the `(#N)` are this cut's own.

- Release lines consulted: `9.2`, `9.1`, `9.0`, `8.1`, `8.0`, `7.0`,
`6.2`, `6.0`, `5.0`, `4.0`, `3.2`, `3.0`, `2.8`, `2.6`, `2.4`, `2.2`
- Reused published wording for 22 note(s)

<details>
<summary>22 note(s) reusing published wording</summary>

| PR | Wording from | Carried wording | This cut generated |
|----|--------------|-----------------|--------------------|
| #5210 | `9.2` (Valkey 9.2.0-rc2) | Correct command metadata to
describe the `ZINCRBY` increment and
`ZINTER`/`ZINTERSTORE`/`ZUNION`/`ZUNIONSTORE` weights as doubles instead
of integers | Fix command metadata to describe the `ZINCRBY` increment
and the `ZINTER`, `ZINTERSTORE`, `ZUNION` and `ZUNIONSTORE` weights as
doubles instead of integers |
| #5128 | `9.2` (Valkey 9.2.0-rc2) | Propagate `PFADD` elements applied
before a corrupted-HLL INVALIDOBJ error so replicas and the AOF stay
consistent with the primary | Fix `PFADD` on a corrupted sparse
HyperLogLog not propagating elements applied before the `INVALIDOBJ`
error to replicas, the AOF, `WATCH` and client tracking |
| #5159 | `9.2` (Valkey 9.2.0-rc2) | Fix a server crash when a module
never sets a postponed reply length; the leftover placeholder is now
filled with an empty array | Fix a server crash when a module replies
with a postponed-length array, map, set or attribute and never sets its
length |
| #5212 | `9.2` (Valkey 9.2.0-rc2) | Mark the `RESTORE` and
`RESTORE-ASKING` `IDLETIME` and `FREQ` options as mutually exclusive in
command metadata | Fix `RESTORE` and `RESTORE-ASKING` command metadata
to mark `IDLETIME` and `FREQ` as mutually exclusive |
| #5118 | `9.2` (Valkey 9.2.0-rc2) | Fix a server panic when a Lua
script returns or raises an error table whose metatable has an `__index`
metamethod that raises an error | Fix the server exiting when a Lua
script returns or raises an error table whose metatable has a raising
`__index` |
| #5120 | `9.2` (Valkey 9.2.0-rc2) | Fix a memory leak when
`server.register_function` named arguments are repeated in a different
letter case | Fix a memory leak in `server.register_function` when a
named argument is repeated with different letter case |
| #5213 | `9.2` (Valkey 9.2.0-rc2) | Correct expiry command metadata to
show that `XX` can be combined with `GT` or `LT`, rather than all four
conditions being mutually exclusive | Fix command metadata for the
`EXPIRE` and `HEXPIRE` command families to show that `XX` can be
combined with `GT` or `LT` |
| #5046 | `9.2` (Valkey 9.2.0-rc2) | Fix a memory leak in
`ValkeyModule_GetCommandKeysWithFlags` when introspecting commands with
large key lists | Fix a memory leak in
`ValkeyModule_GetCommandKeysWithFlags` for commands with large key lists
|
| #4775 | `9.2` (Valkey 9.2.0-rc2) | Bound the time spent per cycle
evicting keys from the client tracking table, avoiding long stalls after
lowering `tracking-table-max-keys` | Fix long server stalls after
lowering `tracking-table-max-keys` by bounding the time spent evicting
keys from the client tracking table per call |
| #5208 | `9.2` (Valkey 9.2.0-rc2) | Correct `SENTINEL SIMULATE-FAILURE`
metadata so `COMMAND DOCS` shows the required mode argument and its
tokens | Fix `SENTINEL SIMULATE-FAILURE` argument metadata so `COMMAND
DOCS` reports the mode as required and includes its tokens |
| #3510 | `9.2` (Valkey 9.2.0-rc1) | Fix a TLS busy loop that consumed
100% CPU when a connection's read or write handler was removed while
OpenSSL was waiting for the opposite event | Fix a TLS busy loop
consuming 100% CPU when a connection's read or write handler is removed
while OpenSSL is waiting on the opposite event |
| #4351 | `9.2` (Valkey 9.2.0-rc1) | Fix a crash caused by a NULL
pointer dereference when all timer events in an event loop are pending
deletion | Fix a NULL dereference crash in the event loop when all time
events are pending deletion |
| #4665 | `9.2` (Valkey 9.2.0-rc1) | Fix `SORT` key extraction so a
`STORE` destination named like an option can no longer bypass ACL checks
and write to an unauthorized key | Fix `SORT` checking ACL key
permissions against the wrong key when a `STORE` destination is named
like an option, which allowed writes to keys outside the user's allowed
patterns |
| #4777 | `9.2` (Valkey 9.2.0-rc2) | Fix `GEOSEARCH` returning empty
results for exact zero-distance matches on builds where floating-point
contraction breaks the latitude distance calculation | Fix `GEOSEARCH`
with a zero radius or box missing the exact-position member on some
builds due to floating-point precision |
| #5180 | `9.2` (Valkey 9.2.0-rc2) | Redact credentials of rejected
`HELLO`, `AUTH` and `MIGRATE` commands so passwords no longer leak to
MONITOR and the commandlog | Redact `HELLO`, `AUTH` and `MIGRATE`
credentials in `MONITOR` and the commandlog even when the command is
rejected for invalid arguments |
| #5244 | `9.2` (Valkey 9.2.0-rc2) | Correct `ZADD` and `LCS` metadata
so `COMMAND DOCS` and valkey-cli hints no longer present `NX` with
`GT`/`LT` or `LEN` with `IDX` as valid combinations | Fix `ZADD` and
`LCS` command metadata so `COMMAND DOCS` and valkey-cli hints mark
mutually exclusive options (`NX` with `GT`/`LT`, `LEN` with `IDX`) |
| #5187 | `9.2` (Valkey 9.2.0-rc2) | Fix a crash when a replication role
change command such as `REPLICAOF` or `CLUSTER REPLICATE` arrives over a
replication link | Fix a crash when a replication role change command
such as `REPLICAOF`, `CLUSTER REPLICATE`, `CLUSTER RESET` or `CLUSTER
FAILOVER TAKEOVER` arrives over a replication link |
| #5126 | `9.2` (Valkey 9.2.0-rc2) | Prevent a replica crash when the
primary wrongly replies +CONTINUE to a full resync request; the replica
now drops the link and retries | Fix a replica crash when the primary
replies `+CONTINUE` to a full resync `PSYNC` request and there is no
cached primary |
| #4171 | `9.2` (Valkey 9.2.0-rc1) | Fix a node staying stuck in PFAIL
when its PING is lost while the peer's own traffic keeps the cluster
link alive | Fix a cluster node staying stuck in PFAIL state when its
PING is lost but the peer's own PINGs keep the link alive |
| #5137 | `9.2` (Valkey 9.2.0-rc2) | Ignore invalid ping extension
values from cluster peers that would corrupt nodes.conf and prevent the
node from restarting | Ignore invalid cluster bus ping extension values
(hostname, node name, client IPs, availability zone) that would corrupt
nodes.conf and prevent the node from restarting |
| #5161 | `9.2` (Valkey 9.2.0-rc2) | Bound the bytes the cluster bus
reads per event so a peer with a constant read backlog cannot starve
clients, cron and heartbeats | Limit the bytes read per event from a
cluster bus link so a peer that keeps sending cannot starve clients,
cron and heartbeats |
| #4190 | `9.2` (Valkey 9.2.0-rc2) | Reclaim client-side caching
tracking table entries left by disconnected clients, fixing a memory
leak under read-heavy workloads, and include the tracking table in
active defrag | Fix a memory leak in client-side caching where IDs of
disconnected clients stayed in the tracking table for keys that are
never modified |

</details>

*Generated by valkey-ci-agent. Review before merging into the release
line.*

---------

Signed-off-by: valkeyrie-bot[bot] <3692572+valkeyrie-bot[bot]@users.noreply.github.com>
Signed-off-by: Sarthak Aggarwal <[email protected]>
Co-authored-by: valkeyrie-bot[bot] <3692572+valkeyrie-bot[bot]@users.noreply.github.com>
Co-authored-by: Sarthak Aggarwal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done
Status: Done
Status: Done
Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants