Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix possible crash copying malformed memcache value responses #636

Merged
merged 1 commit into from
Jul 4, 2021

Conversation

TysonAndre
Copy link
Collaborator

Closes #436

Problem

Malformed messages may have extremely long flags or expiry fields

Solution

Check if the end of the mbuf is reached - valid messages key response chunks should not have headers exceeding
the minimum mbuf size

Result

Log an error and discard results if a memcache server responds with an invalid value response header

@TysonAndre TysonAndre merged commit 4700e93 into master Jul 4, 2021
@TysonAndre TysonAndre deleted the fix-bulk-parsing branch July 4, 2021 20:26
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.

Is function 'memcache_copy_bulk()' in nc_memcache.c safe
1 participant