• Martin Blix Grydeland's avatar
    Fix buffer overflow in HTC_RxInit on workspace exhaustion · c1fa3248
    Martin Blix Grydeland authored
    HTC_RxInit and HTC_RxReInit could write a single '\0' NUL character
    outside of the workspace when its called and there is zero bytes left
    in the workspace. This would trigger the workspace canary causing
    subsequent assertion.
    
    Fix by releaving HTC_RxInit and HTC_RxReInit of adding the '\0'
    character.
    
    HTC_RxStuff and V1F_FetchRespHdr returns HTC_S_OVERFLOW if the
    available buffer space is zero. Both make sure to insert the '\0'
    character just before calling the completion check function.
    
    Note that this fix does not change the fact that we have exchausted
    the workspace and are unable to continue. Varnishd will panic
    nonetheless, but at least we have not stepped out of our boundries.
    
    Ref: #1834
    c1fa3248
Name
Last commit
Last update
..
cache Loading commit data...
common Loading commit data...
hash Loading commit data...
http1 Loading commit data...
mgt Loading commit data...
proxy Loading commit data...
storage Loading commit data...
waiter Loading commit data...
Makefile.am Loading commit data...
Makefile.phk Loading commit data...
builtin.vcl Loading commit data...
flint.lnt Loading commit data...
flint.sh Loading commit data...
vclflint.lnt Loading commit data...
vclflint.sh Loading commit data...