• Yossi Gottlieb's avatar
    Fix integer overflow (CVE-2021-21309). (#8522) · d32f2e99
    Yossi Gottlieb authored
    On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309).
    
    This fix has two parts:
    
    Set a reasonable limit to the config parameter.
    Add additional checks to prevent the problem in other potential but unknown code paths.
    d32f2e99
zmalloc.c 20.1 KB