2020-09-20 TX ES&S Voting Machine Hash Check Falsely Reported a Match When No Comparison Was Made, Texas Examiner Found
ES&S, a maker of Texas voting machines, shipped a hash verification script that prints "matches Trusted Hash File" when no hash comparison was made, Texas Technical Examiner Brian Mechler reported on September 20, 2020.
The script is the safeguard that proves a voting machine runs what was certified, and the same bug sits in the scripts for seven ES&S devices, including the DS200 scanner and the ExpressVote.
Mechler reproduced it by accident, during an August 21, 2020 examination of ES&S EVS 6.1.1.0, when the trusted hash file was missing.
TLDR
- ES&S's voting machine hash check printed a passing result when no comparison was made.
- The same bug sits in the scripts for the DS200, DS450, DS850, ExpressTouch, ExpressVote and ExpressVote XL.
- Texas Examiner Brian Mechler found it during a 2020 Texas Secretary of State examination.
- ES&S personnel, not the counties, had been running the hash verification.
- Mechler refused to recommend certifying future ES&S releases without fixes.
The Findings
- Mechler's report on ES&S EVS 6.1.1.0, dated September 20, 2020: "Despite the missing trusted hash file, the verification script erroneously reported that the exported hashes matched the trusted hashes."
- The script printed "DS200 firmware matches Trusted Hash File." right after the line "diff: HashTrusted-DS200.txt: No such file or directory".
- Mechler: "the bug is also present in the verification scripts for the DS450, DS850, ExpressTouch, ExpressVote (HW 1.0 and 2.1), and ExpressVote XL devices."
- Mechler: "It could be very easy for personnel performing hash verification to assume a good result when, in actuality, no hash comparisons were made."
- The cause: ES&S's script reads only the text diff writes to standard output. Mechler: "In doing so they miss the error messages written to the standard error stream."
- Mechler: "To have the vendor perform a required component of acceptance testing creates, at best, a conflict of interest." ES&S personnel had run the hash verification instead of the customers.
- Mechler found the other hash procedure, for the election management system, "it is not traceable to the hashes generated by the EAC", because it checks only against hashes the jurisdiction creates right after installation.
- Mechler: "I will not recommend certification of future ES&S releases unless they make substantial improvements to the ease-of-use, reliability, and traceability of their hash verification process."
Everything below documents these findings.
What the Script Is Supposed to Do
Hash verification is "the process that is used to ensure that the software and/or firmware of a voting system matches exactly with what was certified by the EAC." A hash is the output of a cryptographic function run on a file: change the file in any way and the hash changes.
The process builds two USB drives, one with the exported system data and one with ES&S's verification scripts and the trusted hash file. A computer separate from the election management system boots a live Ubuntu DVD, mounts both drives and runs the script. ES&S's own documentation says the screen will read "DS200 firmware DOES NOT MATCH Trusted Hash File!" when a mismatch exists.
Texas relies on it. Per Mechler, "In Election Advisory No. 2019-23, jurisdictions are directed to perform a complete system validation which includes the verification of hashes".
What Went Wrong
Mechler left out the instruction to add the trusted hash file to the scripting media. The script printed a diff error that the file did not exist, then printed "DS200 firmware matches Trusted Hash File." Mechler wrote that ES&S "should have performed explicit checks on the existence of the two files being compared; failing loudly if either does not exist," and that diff's own exit status ("0 if inputs are the same, 1 if different, 2 if trouble") was available and unused.
His conclusion on the process: ES&S "has not developed their hash verification process with sufficient care, quality assurance, and concern for usability."
Who Was Running the Check
During the concurrent EVS 6.0.3.0 exam, ES&S disclosed that its own personnel had performed hash verification for customers. Mechler wrote that jurisdictions should always do it themselves and that vendor-run verification is a conflict of interest. The Texas Secretary of State's Elections Division began working with ES&S and its Texas customers to define their roles.
The Numbers
| Item | Figure |
|---|---|
| ES&S device types with the same script bug | 7 (DS200, DS450, DS850, ExpressTouch, ExpressVote HW 1.0 and 2.1, ExpressVote XL) |
| Mechler's examination date | August 21, 2020 |
| Mechler's report date | September 20, 2020 |
| Hash comparisons made when the file was missing | 0 |
| Messages reporting a match when the file was missing | 1 |
Conclusion
ES&S built the check that tells a county its voting machines run certified software, and the check reports a match when it compares nothing. Texas Technical Examiner Brian Mechler found the bug on August 21, 2020 by leaving out one file, and found it in the scripts for seven ES&S devices. ES&S personnel, not the counties, had been running the verification. A county clerk who did not watch for a one-line error message above the passing result would have recorded a clean hash check that never happened.