Skip to content

Fix command arity check in IO threads#14134

Merged
ShooterIT merged 1 commit into
redis:unstablefrom
ShooterIT:io-cmd-arity
Jun 18, 2025
Merged

Fix command arity check in IO threads#14134
ShooterIT merged 1 commit into
redis:unstablefrom
ShooterIT:io-cmd-arity

Conversation

@ShooterIT

@ShooterIT ShooterIT commented Jun 18, 2025

Copy link
Copy Markdown
Member

We need to check the command arity in IO threads, if it is not correct, we should reset it, as we may do memory prefetching according to the iolookedcmd. Accessing argv using the key positions returned by getKeysFromCommand is unsafe and must be avoided for invalid commands. Otherwise, this may lead to invalid memory access and potentially cause the redis to crash.

This bug starts to have an impact after #14017

@ShooterIT ShooterIT requested a review from sundb June 18, 2025 08:47
@snyk-io

snyk-io Bot commented Jun 18, 2025

Copy link
Copy Markdown

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@ShooterIT ShooterIT merged commit a95b94b into redis:unstable Jun 18, 2025
18 checks passed
@ShooterIT ShooterIT deleted the io-cmd-arity branch June 18, 2025 14:29
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