DY Fuzzing: Formal Dolev-Yao Models Meet Cryptographic Protocol Fuzz Testing
Max Ammann, Lucca Hirschi, Steve Kremer
IEEE Symposium on Security and Privacy 2024 · Day 1 · Continental Ballroom 6
Overview
Cryptographic protocols are the bedrock of secure digital communication, yet their complex design and implementation often harbor subtle, dangerous vulnerabilities. The talk "DY Fuzzing: Formal Dolev-Yao Models Meet Cryptographic Protocol Fuzz Testing" introduces a novel approach to uncover these critical flaws by synergistically combining the rigorous analytical power of Dolev-Yao (DY) formal models with the practical effectiveness of fuzz testing. Presented by Max Ammann, Lucca Hirschi, and Steve Kremer, this work addresses significant blind spots in existing security testing methodologies, particularly for protocol-level vulnerabilities that don't manifest as typical memory safety issues.

Key moments
- 0:00 Introduction to cryptographic protocols and implementation challenges
- 1:57 Limitations of classical bit-level fuzzing: reachability problems
- 2:29 Protocol vulnerabilities: no crashes, difficult to detect
- 3:39 Dolev-Yao formal verification: specification only, misses implementation
- 5:32 Summary of key limitations in current security testing
- 6:08 Introducing DY Fuzzing: combining formal models with fuzzing
- 8:08 DY Fuzzer design: architecture, state, mutator, and oracle
DY Fuzzing: Formal Dolev-Yao Models Meet Cryptographic Protocol Fuzz Testing
Speakers: Max Ammann (TR bits); Lucca Hirschi (Inria); Steve Kremer (Inria)
Conference: IEEE S&P
YouTube: https://www.youtube.com/watch?v=vvwJzb-JU2I
Overview
Cryptographic protocols are the bedrock of secure digital communication, yet their complex design and implementation often harbor subtle, dangerous vulnerabilities. The talk "DY Fuzzing: Formal Dolev-Yao Models Meet Cryptographic Protocol Fuzz Testing" introduces a novel approach to uncover these critical flaws by synergistically combining the rigorous analytical power of Dolev-Yao (DY) formal models with the practical effectiveness of fuzz testing. Presented by Max Ammann, Lucca Hirschi, and Steve Kremer, this work addresses significant blind spots in existing security testing methodologies, particularly for protocol-level vulnerabilities that don't manifest as typical memory safety issues.
The core innovation of DY Fuzzing lies in its ability to generate sophisticated, protocol-aware attack traces that mimic the capabilities of a Dolev-Yao attacker. Unlike traditional bit-level fuzzers that struggle to modify the structural logic or message flow of cryptographic protocols, DY Fuzzing uses symbolic terms and a specialized mutator to craft inputs that can explore deep, often unreachable, states within a protocol's execution. This enables the detection of security property violations, such as authentication bypasses, which are notoriously difficult to find with crash-based detection mechanisms.
This research is particularly significant because it bridges the gap between theoretical formal verification, which typically analyzes protocol specifications, and practical implementation testing. By applying a Dolev-Yao attacker model directly within a fuzzing loop, DY Fuzzing offers a powerful new tool for identifying implementation flaws that violate security properties. The speakers demonstrate the efficacy of their approach through TLS Puffin, an open-source fuzzer that has successfully rediscovered known logical attacks and, more importantly, uncovered five new vulnerabilities in widely used TLS libraries like OpenSSL and WolfSSL, solidifying its place as a crucial advancement in cryptographic protocol security.
Background
▶ Watch: Introduction to cryptographic protocols and implementation challenges (0:00)
The landscape of cryptographic protocol security is fraught with challenges. Protocols like TLS (Transport Layer Security) are concurrent programs that leverage cryptography to ensure confidentiality, integrity, and authentication. However, their intricate nature makes them exceptionally difficult to design and implement correctly, leading to a history of high-profile failures. Incidents like Heartbleed, a memory safety vulnerability in OpenSSL, underscore the importance of robust testing. While Heartbleed was detectable by fuzzing, it wasn't discovered that way.
Traditional bit-level fuzzing operates by taking a corpus of test cases, mutating them (e.g., bit flips, byte increments), executing the mutated input against the program under test (PUT), and using feedback like new code coverage to guide further mutations. This approach is highly effective for finding memory safety bugs, but it faces severe limitations when applied to cryptographic protocols:
- Reachability Problem: Bit-level fuzzing struggles to modify the fundamental structure or message flow of a cryptographic protocol. Random bit flips are highly unlikely to produce semantically valid, yet malicious, protocol messages. This makes many protocol-level vulnerabilities effectively unreachable.
- Detection Problem: Many critical security flaws in cryptographic protocols are not memory safety issues; they are protocol vulnerabilities. These arise from violations of security properties, such as the infamous GoToFail bug (an SSL/TLS certificate validation flaw) or the Triple Handshake vulnerability (a TLS session renegotiation flaw). An authentication bypass, for instance, does not cause a program crash; the library simply behaves incorrectly by allowing unauthorized access. Without a crash, classical fuzzers lack a clear signal to detect the vulnerability. Some bugs, like Triple Handshake, are even in specifications, affecting all implementations.
On the other hand, Dolev-Yao (DY) formal verification offers a mathematical model for analyzing cryptographic protocols and their threat models. In the Dolev-Yao model, the attacker is active, controls the entire network (intercepting, modifying, injecting messages), and can use cryptographic primitives (encryption, decryption) if they possess the necessary keys. Messages are modeled as formal terms, allowing for rigorous analysis of protocol traces. Automated verification tools can either prove the absence of attack traces or generate examples of attacks. This approach has a strong track record of finding bugs in protocol specifications. However, its inherent limitation is that it does not examine actual implementations, thus it cannot find implementation flaws or bugs arising from the interplay between a correct specification and a flawed implementation.
This creates a significant "blind spot": vulnerabilities that are either unreachable by classical fuzzing, undetectable due to the absence of crashes, or beyond the scope of formal verification because they exist in the implementation rather than the specification. DY Fuzzing was designed precisely to address this critical gap, combining the strengths of both formal methods and fuzzing to uncover these elusive protocol-level implementation flaws.
Key Findings
▶ Watch: Protocol vulnerabilities: no crashes, difficult to detect (2:29)
The DY Fuzzing approach and its implementation, TLS Puffin, have yielded several significant findings that underscore its efficacy and importance in the cryptographic security landscape.
Firstly, the research demonstrates that by integrating the Dolev-Yao (DY) attacker model into a fuzzing loop, it is possible to overcome the long-standing reachability and detection limitations of classical bit-level fuzzing for cryptographic protocols. The ability to generate and mutate symbolic attack traces, rather than raw bit strings, allows the fuzzer to explore a vastly larger and more semantically relevant state space, enabling it to reach execution paths that trigger protocol-level flaws. Furthermore, the introduction of a specialized objective oracle allows for the detection of security property violations (e.g., authentication bypasses) that do not result in crashes, providing a crucial detection mechanism previously absent in traditional fuzzers.
Secondly, and most compellingly, the practical application of DY Fuzzing led to the discovery of five new vulnerabilities in widely used TLS implementations, specifically OpenSSL and WolfSSL. These vulnerabilities fall into the category of protocol-level flaws that are not discoverable by classical fuzzing techniques, emphasizing the unique capabilities of DY Fuzzing. While the specific CVEs or detailed descriptions of these five vulnerabilities are not provided in the talk, their discovery validates the hypothesis that a significant class of implementation-level protocol bugs remains hidden from existing tools.
Thirdly, the TLS Puffin fuzzer, developed as part of this project, proved highly effective at rediscovering known logical attacks. The speakers established a small benchmarking suite of existing Dolev-Yao-style attacks found in OpenSSL and WolfSSL. TLS Puffin was able to systematically and reproducibly find and rediscover all these vulnerabilities within seconds. This rapid rediscovery capability highlights the efficiency and precision of the DY Fuzzing methodology in identifying known protocol flaws, serving as a strong validation of its design.
Finally, the project emphasizes the modularity and performance of the TLS Puffin implementation. Built on libfuzzer and written in Rust, it uses in-memory buffers for fast execution and is delightfully parallel. Its modular design makes it easy to add support for new protocols and programs under test (PTs), suggesting a broad applicability beyond TLS. The development of a TLS mapper supporting approximately 200 function symbols further demonstrates the practical feasibility and scalability of the approach for complex real-world protocols.
Technical Deep Dive
▶ Watch: Dolev-Yao formal verification: specification only, misses implementation (3:39)
The core innovation of DY Fuzzing lies in its paradigm shift from manipulating raw bit strings to operating on formal terms that represent cryptographic protocol messages and attacker actions. This enables the fuzzer to emulate a sophisticated Dolev-Yao (DY) attacker within a continuous fuzzing loop.
The fundamental idea is to replace byte-array test cases with symbolic traces that express everything a DY attacker can do. These traces are sequences of output and input steps. An output step asks a protocol participant (e.g., client) to generate a message, contributing new knowledge to the attacker's store. An input step uses the attacker's accumulated knowledge to construct an attack term and inject it into another participant (e.g., server). The grammar of a trace consists of these atomic output and input actions, allowing for complex attack sequences.
The DY Fuzzer design comprises several key components:
- State: The fuzzer maintains a corpus of DY attack traces. This corpus is initially seeded with "happy flows" – normal, legitimate protocol execution traces.
- Scheduler: Responsible for picking a random test case (a symbolic trace) from the corpus for mutation.
- Mutator: This is where the DY attacker model is most evident. Instead of simple bit flips, the mutator applies DY-specific operations to the symbolic traces. These mutations fall into two categories:
- Action/Step-level mutations:
Skip: Deletes an action (e.g., skipping a message).Repeat: Duplicates an action (e.g., replaying a message).- Term-level mutations: These operate on the formal terms within
inputoroutputsteps. Swap: Swaps two subterms within a trace.Generate: Inserts a newly generated, closed term (a term not depending on external variables) into a random spot in the trace.Replace Match: Swaps one function symbol for another (e.g., replacing a hashing algorithm with a different one, if semantically plausible in the context of the protocol's supported ciphersuites).Replace Use: Replaces a subterm with another existing subterm from the attacker's current knowledge.Replace and Lift: Replaces a term with one of its subterms, effectively simplifying or extracting components from a complex message.
- Harness: This component is responsible for bridging the gap between the symbolic DY traces and the concrete program under test (PUT). It consists of two main parts:
- Mapper: The mapper interprets the formal terms and function symbols (e.g., decryption, encryption, signing) into their concrete bit string representations. For each function symbol, it assumes a concrete interpretation (e.g., an elliptic curve signature for
sign). Output of interpretation yields bit strings, and constants are statically generated. Crucially, the mapper is protocol-dependent (you write one per protocol, specifying how terms map to bytes) but PT-independent (it can be reused for different implementations of the same protocol). - Executor: The executor takes the concretized trace and runs it against the PUT. It first initializes client/server instances (e.g., like in OpenSSL). For each step in the trace:
- If it's an
outputstep: The client is allowed to progress in its internal state, and its resulting output is read from its output buffer, adding to the attacker's knowledge. - If it's an
inputstep: The attack term is first concretized into a bit string by the mapper, then passed to the PUT (e.g., the server), which is then allowed to progress its internal state. The executor is PT-dependent, requiring lightweight harnessing specific to each library or application.
- Objective Oracle: This is the detection mechanism for vulnerabilities. It combines classical and DY-specific detection:
- Memory-related detection: Standard instrumentation with tools like Address Sanitizer (ASan) is used to detect memory corruptions (crashes, out-of-bounds access).
- DY security properties: This is the novel part. The fuzzer introduces claims that can be triggered by a server or client during execution. For example, an "agreement claim" could be triggered when a client believes it has successfully agreed on session parameters with a server. Security properties are then defined as first-order formulas over these claims (e.g., "if client claims agreement, then server must also claim agreement with the same parameters"). The oracle gathers all claims generated during an execution and then checks these DY security properties. A violation indicates a protocol vulnerability (e.g., an authentication bypass).
- Code Coverage: While the DY Fuzzer introduces protocol-aware mechanisms, it still utilizes conventional code coverage to determine if a generated input is "interesting" and to guide the fuzzing process towards new execution paths. However, the speakers acknowledge that code coverage alone is a "poor metric" for protocol fuzzing, as reaching a statement from an attack state might yield similar coverage as a happy flow, leading to exhaustion. This points to future work on domain-specific DY-based coverage notions.
The entire system is implemented in TLS Puffin, an open-source project written in Rust and built on top of libfuzzer, a modular fuzzing library. It uses in-memory buffers for high performance, avoiding the overhead of network communication over TCP, and supports parallel execution. The project's modularity is a key design goal, making it straightforward to extend support for new protocols or different PTs. For TLS specifically, a mapper supporting approximately 200 function symbols has been implemented, and several PUTs (e.g., OpenSSL, WolfSSL) have been successfully harnessed.
Demo / Proof of Concept
▶ Watch: Introducing DY Fuzzing: combining formal models with fuzzing (6:08)
While the talk does not describe a live, real-time demonstration during the presentation, the efficacy and practical applicability of DY Fuzzing are thoroughly proven through its experimental evaluation and the tangible security discoveries it facilitated. The results presented serve as a compelling proof of concept for the methodology.
The primary demonstration of DY Fuzzing's capabilities comes from its ability to systematically and reliably uncover both known and previously unknown vulnerabilities in real-world cryptographic libraries. The speakers established a small benchmarking suite consisting of existing Dolev-Yao-style logical attacks that had been previously identified in OpenSSL and WolfSSL. The TLS Puffin implementation of DY Fuzzing was able to find and rediscover all these vulnerabilities within seconds. This rapid and reproducible rediscovery rate is a strong validation of the fuzzer's design, confirming its ability to navigate complex protocol state machines and trigger known protocol flaws efficiently.
Beyond rediscovery, the most significant proof of concept is the successful identification of five new vulnerabilities during the ongoing fuzzing of these libraries. These new findings are critical because they represent a class of protocol-level implementation flaws that could not be found through classical fuzzers, as explicitly stated by the speakers. This outcome directly validates the core premise of DY Fuzzing: that combining Dolev-Yao attacker models with fuzzing can uncover vulnerabilities that are otherwise unreachable or undetectable by traditional methods. The discovery of these novel bugs in widely deployed software underscores the practical impact of DY Fuzzing in enhancing the security posture of critical communication protocols. The fact that these were "new vulnerabilities" and not merely rediscoveries highlights the unique explorative power of the DY Fuzzing approach.
Defensive Implications
▶ Watch: DY Fuzzer design: architecture, state, mutator, and oracle (8:08)
The introduction of DY Fuzzing and the TLS Puffin tool carries significant implications for defenders of cryptographic protocols and systems. The findings highlight a critical gap in current security testing practices and offer a powerful new methodology to address it.
Firstly, organizations developing or deploying systems reliant on cryptographic protocols must recognize that traditional memory safety fuzzing is insufficient for comprehensive security assurance. The existence of protocol-level vulnerabilities that do not cause crashes and are unreachable by bit-level fuzzers means that a significant attack surface remains unexamined by conventional tools. Defenders should integrate protocol-aware fuzzing techniques, such as DY Fuzzing, into their Secure Development Lifecycle (SDLC). This means moving beyond just testing for memory corruption and actively looking for violations of cryptographic security properties like authentication, confidentiality, and integrity.
Secondly, the approach provides a blueprint for building more effective custom fuzzers for critical protocols. Security teams and researchers can leverage the principles of DY Fuzzing – modeling messages as formal terms, designing protocol-specific mutations, and implementing objective oracles based on security claims – to develop specialized tools for their unique protocol implementations. The open-source nature of TLS Puffin (written in Rust and built on libfuzzer) encourages adoption and adaptation, allowing defenders to analyze their own Programs Under Test (PUTs).
Thirdly, the work underscores the importance of a hybrid approach to security testing. While formal verification is excellent for specifications and classical fuzzing for memory safety, DY Fuzzing fills the crucial void for implementation-level protocol flaws. Defenders should consider a layered testing strategy that incorporates all three: formal verification for design, DY Fuzzing for protocol logic implementation, and bit-level fuzzing for low-level memory safety.
Furthermore, the discussion on limitations of code coverage as a metric for protocol fuzzing points to a future need for domain-specific coverage metrics. Defenders should push for and explore new ways to measure fuzzing effectiveness that are tailored to the semantic complexity of cryptographic protocols, rather than relying solely on generic code paths. This could involve tracking coverage of protocol states, message types, or cryptographic operations.
Finally, the potential for differential fuzzing (as noted in future work) offers a valuable defensive strategy. By fuzzing multiple implementations of the same protocol (e.g., OpenSSL vs. WolfSSL) and comparing their responses, defenders can identify subtle discrepancies that may indicate specification ambiguities or implementation bugs, even if no explicit security property is violated. This can help proactively identify weaknesses before they are exploited.
In essence, DY Fuzzing provides a robust methodology for identifying a class of vulnerabilities that have historically been difficult to detect. Adopting its principles and tools can significantly enhance the security posture of cryptographic protocol implementations, moving towards a more complete and resilient defense against sophisticated attacks.
Key Takeaways
- DY Fuzzing fills a critical gap: It addresses the limitations of classical bit-level fuzzing (reachability and detection problems) and formal verification (specification-only focus) for cryptographic protocol security, specifically targeting implementation-level protocol vulnerabilities.
- Novel Methodology: The approach integrates the Dolev-Yao attacker model directly into a fuzzing loop, using symbolic traces and protocol-aware mutations to generate sophisticated attack inputs.
- Effective Vulnerability Discovery: The TLS Puffin fuzzer, an open-source implementation, successfully rediscovered known logical attacks in OpenSSL and WolfSSL within seconds and, crucially, uncovered five new vulnerabilities previously missed by traditional fuzzers.
- Advanced Detection Capabilities: DY Fuzzing introduces a specialized objective oracle that detects security property violations (e.g., authentication bypasses) through "claims" rather than relying solely on crashes, significantly expanding detection capabilities.
- Modular and Practical Tooling: TLS Puffin is written in Rust, built on libfuzzer, and features a modular design, an in-memory execution environment, and a TLS mapper supporting ~200 function symbols, making it adaptable and efficient for real-world protocol testing.
- Future Directions for Enhanced Security: The research highlights the need for improved, domain-specific coverage metrics for protocol fuzzing and paves the way for advanced techniques like differential fuzzing and deeper integration with formal verifiers.
About the Speaker(s)
The talk "DY Fuzzing: Formal Dolev-Yao Models Meet Cryptographic Protocol Fuzz Testing" was a collaborative effort presented by Max Ammann, Lucca Hirschi, and Steve Kremer.
Max Ammann is affiliated with TR bits, a company focused on security and cryptography. His work on DY Fuzzing contributes to practical tools and methodologies for securing complex cryptographic implementations.
Lucca Hirschi is a researcher at Inria, the French National Institute for Research in Digital Science and Technology. His expertise often lies in formal methods and cryptographic protocol analysis, evident in the Dolev-Yao modeling aspects of this research.
Steve Kremer is also a researcher at Inria. He is a recognized expert in cryptographic protocol verification and security, with a strong background in applying formal methods to ensure the correctness and security of complex systems.
Together, their combined expertise in formal verification, cryptographic analysis, and practical security testing allowed for the development of the innovative DY Fuzzing methodology, bridging theoretical rigor with implementation-level vulnerability discovery.
Reviews
Dr. Zero (Offensive Security Researcher) — MUST SEE
This is a critical advancement in cryptographic protocol security, successfully bridging the long-standing gap between formal verification and fuzz testing. The DY Fuzzing approach, demonstrated by TLS Puffin, effectively uncovers protocol-level implementation flaws that traditional methods miss, proven by five new vulnerabilities in major TLS libraries. This work defines a new standard for robust protocol security testing.
Heather Calloway (CISO) — STRONG ACCEPT
This research presents a critical advancement in securing cryptographic protocols, addressing a significant blind spot in current testing methodologies. By integrating Dolev-Yao models with fuzzing, it effectively uncovers implementation-level vulnerabilities traditional methods miss, demonstrably finding new flaws in widely used libraries. This work offers a powerful, actionable approach for security leaders to enhance their organization's resilience against sophisticated protocol attacks.
→ Top-rated talks at IEEE Symposium on Security and Privacy 2024