Skip to content

Fix: Protect cluster session key from length overflow#2867

Merged
michael-grunder merged 1 commit into
developfrom
fix.session-key-overflow
Jun 8, 2026
Merged

Fix: Protect cluster session key from length overflow#2867
michael-grunder merged 1 commit into
developfrom
fix.session-key-overflow

Conversation

@michael-grunder
Copy link
Copy Markdown
Member

Rework cluster_session_key to return either a newly allocated zend_string* when we have a prefix, or a cheap copy when we don't.

Previously we were using int to curry the length which was in theory susceptible to overflow if ZSTR_LEN(prefix) + keylen > INT_MAX).

Fixes #2866

Rework `cluster_session_key` to return either a newly allocated
`zend_string*` when we have a prefix, or a cheap copy when we don't.

Previously we were using `int` to curry the length which was in theory
susceptible to overflow if `ZSTR_LEN(prefix) + keylen > INT_MAX)`.

Fixes #2866
@michael-grunder michael-grunder merged commit ae74b64 into develop Jun 8, 2026
158 of 171 checks passed
@michael-grunder michael-grunder deleted the fix.session-key-overflow branch June 8, 2026 16:22
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.

2 participants