• Yossi Gottlieb's avatar
    Fix integer overflow (CVE-2021-21309). (#8522) · 48f04a82
    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.
    
    (cherry picked from commit d32f2e99)
    
    Fix MSVR reported issue.
    48f04a82
config.c 101 KB