Individual submission M. Kucherawy Internet-Draft Facebook, Inc. Intended status: Informational November 5, 2018 Expires: May 9, 2019 Security Considerations Regarding Compression Dictionaries draft-kucherawy-httpbis-dict-sec-00 Abstract Data compression algorithms benefit from blocks of tuning data called "dictionaries". These can greatly improve data compression speed and/or ratios, but their use and application has numerous potential security issues of concern to the communities using them. This document enumerates security issues known about compression dictionaries at the time of publication so that future proposals for use of dictionaries can benefit from this collected material. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on May 9, 2019. Copyright Notice Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of Kucherawy Expires May 9, 2019 [Page 1] Internet-Draft Compression Dictionary Security November 2018 the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Dictionary Security Concerns . . . . . . . . . . . . . . . . . 3 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 4 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 4 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 5 6.1. Normative References . . . . . . . . . . . . . . . . . . . 5 6.2. Informative References . . . . . . . . . . . . . . . . . . 5 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . . 5 Appendix B. Prior Art . . . . . . . . . . . . . . . . . . . . . . 5 Kucherawy Expires May 9, 2019 [Page 2] Internet-Draft Compression Dictionary Security November 2018 1. Introduction Brotli [RFC7932] and Zstandard [RFC8478] are examples of two modern data compression algorithms. While useful in their basic forms, they can be made far more effective with specific types of payloads when used with an object called a "dictionary". A dictionary is a map that can be applied during compression or uncompression that provides an advantage when operating against specific types of content. One might, for example, develop a dictionary that makes the compression algorithm more effective when applied to specific types of audio data. As dictionaries are being developed, some issues have come to light that indicate ways that use of dictionaries might introduce destructive side effects to the environment in which their use is applied. This document is a collection of those topics, which can be consulted as work on dictionaries progresses; later, as RFCs are published advancing dictionaries, the content of this document could be used as a checklist to ensure that either the algorithms or their specification documents have been appropriately evaluated against these concerns. 2. Definitions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. 3. Dictionary Security Concerns These subsections each describe an issue that has been raised with respect to use of dictionaries as input to compression and uncompression. Where possible and known, acceptable mitigations are described. [TODO: This is a bullet list for now, but each bullet item will gradually be converted into a subsection containing relevant discussion.] o Attacks that use dictionary-based compression to recover content in the response. o Attacks that use dictionary-based compression to recover content in the dictionary. Kucherawy Expires May 9, 2019 [Page 3] Internet-Draft Compression Dictionary Security November 2018 o Attacks that leverage dictionary-based compression to violate CORS/SOP/CSP. [need references and expansions for these] o Attacks that manipulate a response's content by manipulating the contents of a dictionary. o Attacks that obfuscate a malicious response's content through the use of dictionary-based compression. o Attacks that identify users by fingerprinting their advertisement or use of dictionaries. o Attacks that reveal past user behavior or associations through the negotiation and use of dictionaries. o Attacks that use dictionaries to achieve denial-of-service / resource exhaustion: * against network resources * against storage resources * against computation resources * against the client * against the server * against an intermediary * against a third-party o Inadvertent leakage of private information in the creation of dictionaries. o General security risks that follow from complexity of implementation. 4. IANA Considerations This document includes no actions for IANA. [RFC Editor: Please remove this section before publication.] 5. Security Considerations This document enumerates known security considerations about a space that is under development. The list of issues discussed above may Kucherawy Expires May 9, 2019 [Page 4] Internet-Draft Compression Dictionary Security November 2018 not be exhaustive, but it is hopefully complete enough to ensure quality work is produced as a result. 6. References 6.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ RFC2119, March 1997, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . 6.2. Informative References [RFC7932] Alakuijala, J. and Z. Szabadka, "Brotli Compressed Data Format", RFC 7932, DOI 10.17487/RFC7932, July 2016, . [RFC8478] Collet, Y. and M. Kucherawy, Ed., "Zstandard Compression and the application/zstd Media Type", RFC 8478, DOI 10.17487/RFC8478, October 2018, . Appendix A. Acknowledgements The author wishes to acknowledge the following for their review and constructive criticism of this update: TBD Appendix B. Prior Art Some prior art worth considering: o draft-lee-sdch-spec, which was implemented in Chrome but then withdrawn o draft-vkrasnov-h2-compression-dictionaries o draft-vandevenne-shared-brotli-format o HTTPBIS discussion during IETF 97 o Brotli "fetch spec" proposal: https://fetch.spec.whatwg.org/ Kucherawy Expires May 9, 2019 [Page 5] Internet-Draft Compression Dictionary Security November 2018 o various HTTPBIS mailing list threads about dictionaries Author's Address Murray S. Kucherawy Facebook, Inc. 1 Hacker Way Menlo Park, CA 94025 US EMail: msk@fb.com Kucherawy Expires May 9, 2019 [Page 6]