Skip to content

Tests: memcached response length overflow detection - #99

Draft
VadimZhestikov wants to merge 1 commit into
nginx:masterfrom
VadimZhestikov:test/memcached-length-overflow
Draft

Tests: memcached response length overflow detection#99
VadimZhestikov wants to merge 1 commit into
nginx:masterfrom
VadimZhestikov:test/memcached-length-overflow

Conversation

@VadimZhestikov

Copy link
Copy Markdown
Contributor

Regression test for nginx/nginx#1637 ("Memcached: fixed integer overflow with
large response lengths").

A fake memcached backend returns a VALUE line with a length of
9223372036854775807, which overflows when the size of the response trailer
("\r\nEND\r\n") is added to it in ngx_http_memcached_filter_init().

Without the fix nginx accepts it and sends the bogus length on to the client:

HTTP/1.1 200 OK
Content-Length: 9223372036854775807

and the trailer is never validated. With the fix the response is rejected as
an invalid length and the request fails with 502.

Marked TODO, as the fix is not yet released.

A length that overflows when the size of the response trailer is added
to it is rejected, instead of being sent to the client as a content
length.

Marked TODO, as the fix is not yet released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants