-
Notifications
You must be signed in to change notification settings - Fork 693
memcached: apply patch: fix crash in binary protocol #18459
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
base: 3.0-dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||||
| From 2e623108dec9759ad3e258aa695288a1ef6a0c72 Mon Sep 17 00:00:00 2001 | ||||||||
| From: dormando <dormando@rydia.net> | ||||||||
| Date: Fri, 1 May 2026 13:48:44 -0700 | ||||||||
| Subject: [PATCH] proto: fix crash in binary protocol | ||||||||
|
|
||||||||
| If `watch mutations` is running and a binary protocol SET fails the | ||||||||
| logger code attempts to resolve a NULL item reference and will crash. | ||||||||
|
|
||||||||
| Reported by Haruto Kimura (Stella) | ||||||||
|
cwize1 marked this conversation as resolved.
|
||||||||
|
|
||||||||
| Upstream Patch Reference : https://github.com/memcached/memcached/commit/32ea7d8b5b | ||||||||
| --- | ||||||||
| proto_bin.c | 2 +- | ||||||||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||||||||
|
|
||||||||
| diff --git a/proto_bin.c b/proto_bin.c | ||||||||
| index 778ea9a..0e92539 100644 | ||||||||
| --- a/proto_bin.c | ||||||||
| +++ b/proto_bin.c | ||||||||
| @@ -1136,7 +1136,7 @@ static void process_bin_update(conn *c, char *extbuf) { | ||||||||
| /* FIXME: losing c->cmd since it's translated below. refactor? */ | ||||||||
| LOGGER_LOG(c->thread->l, LOG_MUTATIONS, LOGGER_ITEM_STORE, | ||||||||
| NULL, status, 0, key, nkey, req->message.body.expiration, | ||||||||
| - ITEM_clsid(it), c->sfd); | ||||||||
| + 0, c->sfd); | ||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue (blocking): supply the missing
status, comm, key, nkey, nbytes, ttl, clsid, sfdThis call supplies only seven: status, 0, key, nkey, expiration, 0, c->sfdBefore this patch, evaluating Please include all eight fields. Based on the successful-store call contract, the failure path should resemble:
Suggested change
The same seven-argument mismatch is still present on upstream Upstream evidence:
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reviewing this closer, given that this issue is present in upstream and is a cosmetic logging defect ( We should also report this logging issue upstream, and if fixed upstream, backport that fix to our version. |
||||||||
|
|
||||||||
| /* Avoid stale data persisting in cache because we failed alloc. | ||||||||
| * Unacceptable for SET. Anywhere else too? */ | ||||||||
| -- | ||||||||
| 2.55.0 | ||||||||
|
|
||||||||
Uh oh!
There was an error while loading. Please reload this page.