Bug 2066213

Summary: LZ77: Practical Timing Side Channel Attacks on Memory Compression
Product: [Other] Security Response Reporter: Riccardo Schirone <rschiron>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: databases-maint, fjanus, jamartis
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2066219, 2066220, 2066217, 2066218    
Bug Blocks: 2065654    

Description Riccardo Schirone 2022-03-21 09:22:37 UTC
LZ77-based compression algorithms are susceptible to timing side channels attacks which could be used by a remote attacker to disclose secret compressed information based on the time it takes for the algorithm to decompress such data. Algorithms such as DEFLATE (in zlib), PGLZ (in PostgreSQL), and zstd if used to store attacker-controlled data together with some secret data (e.g. a cookie) could leak the secret part of the data through the differences in timing required to decompress the data.

References:
https://arxiv.org/abs/2111.08404

Comment 4 Riccardo Schirone 2022-03-21 09:39:42 UTC
It is not clear if there is even a fix for this issue yet. The paper proposes few mitigations:
1) disabling LZ77: I think this would defeat the purpose of compression, so I'm not sure it is feasible
2) masking: protect secrets from being compressed with attacker-controlled data
3) randomization: unclear if it is valuable mitigation
4) keyword protection: uses a "sensitive keyword list" used to split the set of keywords into a subset of secret/sensitive keywords and non-secret ones

According to the paper, probably the best strategy in practice is to avoid sensitive data being compressed with potential attacker-controlled data.