]> git.ipfire.org Git - thirdparty/squid.git/commit
Do not update StoreEntry expiration after errorAppendEntry() (#1580)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 12 Nov 2023 09:33:20 +0000 (09:33 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Tue, 28 Nov 2023 01:03:38 +0000 (14:03 +1300)
commit7e8eec79880cc207ba61b662eb8b93081101b62c
treef50df6bf35965d87d0aeb7c92025d35fa30e2e04
parent290ae202883ac28a48867079c2fb34c40efd382b
Do not update StoreEntry expiration after errorAppendEntry() (#1580)

errorAppendEntry() is responsible for setting entry expiration times,
which it does by calling StoreEntry::storeErrorResponse() that calls
StoreEntry::negativeCache().

This change was triggered by a vulnerability report by Joshua Rogers at
https://megamansec.github.io/Squid-Security-Audit/cache-uaf.html where
it was filed as "Use-After-Free in Cache Manager Errors". The reported
"use after free" vulnerability was unknowingly addressed by 2022 commit
1fa761a that removed excessively long "reentrant" store_client calls
responsible for the disappearance of the properly locked StoreEntry in
this (and probably other) contexts.
src/cache_manager.cc