A Model-Guided Testing of Client-Side DNS Resource Record Handling
The Domain Name System (DNS) is rapidly evolving with new features such as SVCB/HTTPS resource records, Encrypted Client Hello (ECH), and Happy Eyeballs v3. These new features introduce complex behaviors for DNS clients (e.g., browser engines). Consequently, correct and reliable client-side handling of DNS responses has become increasingly critical in ensuring the functionality of the DNS protocol. However, such client-side behavior has not been systematically examined. To address this research gap, we develop DREAM (DNS Resource-record Evaluation through Automated Model-based testing), a model-guided testing framework based on RFC specifications to systematically discover and analyze DNS client behaviors across platforms. Unlike DNS server-side specifications which are generally deterministic and well-specified, client-side specifications involve many optional behaviors and even underspecified behaviors. DREAM tackles these challenges by enumerating underspecified cases and modeling using nondeterministic state transitions. Using DREAM, we generate 5.2K test cases and evaluate popular browsers across five operating systems. We uncover 20 behavioral differences across clients: 4 RFC violations, 9 divergent implementation choices, and 7 unsupported features, leading to inconsistent connection results across clients and negatively affecting security, privacy, and user experience. Among them, we have submitted 10 bug reports involving implementation issues to browser engine vendors.