Skip to content

Conversation

@zuiderkwast
Copy link
Contributor

Backporting some PRs and add some release notes (the ones labeled for that).

Fusl and others added 7 commits September 30, 2025 12:56
When calling the command `EVAL error{} 0`, Valkey crashes with the
following stack trace. This patch ensures we never leave the
`err_info.msg` field null when we fail to extract a proper error
message.

---------

Signed-off-by: Fusl <[email protected]>
Signed-off-by: Binbin <[email protected]>
Co-authored-by: Binbin <[email protected]>
Few of the servers log are stored as `server1/2/3.log` . Various type of
acl files are created and weren't getting cleaned up prior to this
change.
https://github.com/valkey-io/valkey/blob/daea05b1e26db29bfd1c033e27f9d519a2f8ccbb/src/networking.c#L886-L886

Fix the issue need to ensure that the subtraction `prev->size -
prev->used` does not underflow. This can be achieved by explicitly
checking that `prev->used` is less than `prev->size` before performing
the subtraction. This approach avoids relying on unsigned arithmetic and
ensures the logic is clear and robust.

The specific changes are:
1. Replace the condition `prev->size - prev->used > 0` with `prev->used
< prev->size`.
2. This change ensures that the logic checks whether there is remaining
space in the buffer without risking underflow.

**References**
[INT02-C. Understand integer conversion
rules](https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+rules)
[CWE-191](https://cwe.mitre.org/data/definitions/191.html)

---

Signed-off-by: Zeroday BYTE <[email protected]>
pthread functions return the error instead of setting errno.

Fixes valkey-io#2525

Signed-off-by: Ted Lyngmo <[email protected]>
This should be + instread of *, otherwise it does not make any sense.
Otherwise we would have to calculate 20 more bytes for each prefix rax
node in 64 bits build.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Viktor Söderqvist <[email protected]>
@zuiderkwast zuiderkwast changed the title Backport preparations for 7.2.11 Backport to 7.2.11 Sep 30, 2025
@zuiderkwast
Copy link
Contributor Author

The UBSAN compains about casting function pointers. We would need to backport #1451 to fix that, but it has many merge conflicts. Probably easier to re-implement it on 7.2 than fixing the merge conflicts. (Ignoring it for now. 🙈)

@zuiderkwast zuiderkwast requested a review from ranshid September 30, 2025 13:29
@zuiderkwast zuiderkwast marked this pull request as ready for review September 30, 2025 13:29
Copy link
Member

@ranshid ranshid left a comment

Choose a reason for hiding this comment

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

LGTM

small comment to align text for release notes

@zuiderkwast zuiderkwast merged commit 0ad3bad into valkey-io:7.2 Oct 1, 2025
42 of 57 checks passed
@zuiderkwast zuiderkwast deleted the backport-7.2.11 branch October 1, 2025 14:04
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.

7 participants