Skip to content

PHP Fatal Error: Possible integer overflow in memory allocation (18446744073709551614 + 4096) #1936

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

Closed
2 tasks done
POPSuL opened this issue Feb 26, 2021 · 0 comments · Fixed by #1937
Closed
2 tasks done
Assignees
Labels

Comments

@POPSuL
Copy link

POPSuL commented Feb 26, 2021

Expected behaviour

Driver should return false, because value 123 is not data compressed by zstd

Actual behaviour

PHP Fatal Error: Possible integer overflow in memory allocation (18446744073709551614 + 4096)

I'm seeing this behaviour on

  • OS: Ubuntu linux
  • Redis: 6.0.6
  • PHP: 8.0.2
  • phpredis: 5.3.3

Steps to reproduce, backtrace or example script

  1. Set some value into cache (e.g. abc=123)
  2. Enable ZSDT compression
  3. try to fetch value by key abc

I've checked

  • There is no similar issue from other users
  • Issue isn't fixed in develop branch
@michael-grunder michael-grunder self-assigned this Feb 26, 2021
michael-grunder added a commit that referenced this issue Feb 26, 2021
ZSTD uses two defined error numbers to inform the caller when the
compressed data is invalid (e.g. wrong magic number) or the size is
unknown.

We should always know the size so abort if ZSTD returns either to us.

Fixes: #1936
michael-grunder added a commit that referenced this issue Mar 22, 2021
ZSTD uses two defined error numbers to inform the caller when the
compressed data is invalid (e.g. wrong magic number) or the size is
unknown.

We should always know the size so abort if ZSTD returns either to us.

Fixes: #1936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants