Firmware binary diffing compares two versions of the same firmware image — typically a device's currently deployed build against a newly released update — at the function and basic-block level to find exactly what changed, because vendor release notes routinely say little more than "security improvements" without naming the vulnerability fixed. The resulting diff becomes the only public record of what was actually wrong, and it cuts both ways: an analyst uses it to understand and triage an n-day risk still present on every device running the older image, and an attacker uses the same diff to reconstruct the bug a vendor never disclosed.
Key takeaways
- Silent patching is common, not an exception.
- Comparing two firmware builds byte-for-byte mostly fails, because a recompile — even with no logic changes at all — can shift every function's address, reorder sections and change compiler-generated padding.
- The short answer is that diffing a patch is not a theoretical shortcut — it has been a demonstrated, automatable technique for well over a decade.
- This guide draws on the BinDiff manual (zynamics/Google), binwalk's README (ReFirmLabs), Brumley et al.'s 2008 IEEE S&P paper, NIST SP 800-40r4 and CISA's KEV catalog, read directly 2026-11-09.
Why do vendors patch firmware without saying what they fixed?
Silent patching is common, not an exception. A security fix bundled into a routine firmware update competes for release-note space with feature changes and bug fixes that have nothing to do with security, and a vendor weighing early disclosure against giving attackers a blueprint often chooses brevity. NIST frames the underlying problem — not the silence itself, but why patching discipline matters regardless of how much a vendor says — directly in NIST SP 800-40r4, the Guide to Enterprise Patch Management Planning: "there are many in the world who continuously search for and exploit flaws in software," which is exactly why a device still running the pre-patch image stays exposed for as long as the patch sits undeployed, whether or not its advisory text ever named the flaw. A firmware fleet with dozens of SKUs and a slow update cadence (see our firmware OTA update security guide for what a healthy update pipeline actually checks) can leave that gap open for months.
How does structural binary diffing actually identify a changed function?
Comparing two firmware builds byte-for-byte mostly fails, because a recompile — even with no logic changes at all — can shift every function's address, reorder sections and change compiler-generated padding. BinDiff, described in its own manual as "the leading executable-comparison tool for reverse engineers that need to analyze patches, malware variants, or are generally interested in the differences between two executables," instead works on structure: "every function gets a signature, based on the structure of the (normalized) flow graph of the function," built from the number of codeblocks, the number of edges between them, and the number of calls to subfunctions. Functions whose signature occurs exactly once in each binary become an initial match; from there BinDiff "uses callgraphs... to generate more matches," progressively drilling down through ambiguous cases to basic-block-level comparison inside each matched function pair.
| Step | What it does | Typical tool |
|---|---|---|
| 1. Unpack both images | Extract bootloader, kernel, filesystems and individual binaries from the pre-patch and post-patch firmware | binwalk |
| 2. Identify matching binaries | Pair up the same named executable or library across both unpacked trees | File/path matching, component inventory |
| 3. Structural function match | Match functions between the two binaries by flow-graph signature and callgraph, not raw address | BinDiff, or the open-source Diaphora |
| 4. Classify the diff | Separate "identical," "matched but changed" and "added/removed" functions | BinDiff's match confidence/similarity score |
| 5. Triage changed functions | Decide which changed function is a security fix versus an unrelated refactor or feature change | Analyst review, cross-referenced against any CVE/advisory text |
A function that keeps an identical structural signature between the two builds is unchanged — safe to ignore for this purpose. A function whose flow graph changed shape, especially one touching input parsing, memory handling or an authentication check, is exactly where to look first; our weak cryptography in embedded firmware and memory corruption in embedded firmware guides cover what those changed functions tend to look like once found.
Why does a silent fix turn into an n-day risk so quickly?
The short answer is that diffing a patch is not a theoretical shortcut — it has been a demonstrated, automatable technique for well over a decade. Brumley, Poosankam, Song and Zheng's 2008 IEEE Symposium on Security and Privacy paper, Automatic Patch-Based Exploit Generation is Possible: Techniques and Implications, showed that comparing a patched binary against its pre-patch version could be enough for an automated system to reconstruct a working exploit for the vulnerability the patch fixed, often faster than a defender without the same tooling could read and act on an advisory. That result is the concrete reason "the release notes didn't mention a CVE" buys a device maker far less time than it appears to: the moment an update is public, every device still on the older image is running known-vulnerable code whether or not that vulnerability has a public identifier yet. CISA's Known Exploited Vulnerabilities (KEV) catalog exists for the same reason from the defender's side — tracking what is actually being exploited in the wild, not only what a vendor chose to describe — and pairing KEV with FIRST's EPSS score is the practical way to prioritize which diffed finding needs a fix shipped first; see our KEV and EPSS prioritization guide for how that scoring actually works.
AI-assisted analysis: what SoftWSP actually runs
SoftWSP's automated pipeline does not run BinDiff-style, function-level structural diffing — that is the specialist analyst workflow described above, done by a person with BinDiff or the open-source Diaphora project against two unpacked images. What SoftWSP's scan actually does, across both a firmware image and a newer version of the same image, is the same binary-analysis identification our firmware SBOM guide covers: unpack each image, identify the software components and versions present (the same entropy and signature analysis our firmware entropy analysis guide describes helps separate unpacked code from encrypted or compressed regions first), and match each component version against known CVE data, CISA's KEV catalog and FIRST's EPSS score. Comparing that component inventory before and after an update shows which library or module actually changed version — the version-level signal a patch diff narrows down to before any function-level work starts.
AI's role is narration, not detection, on top of that deterministic matching: it writes the plain-language summary of which components changed, which CVEs that version bump closes, and which newly matched CVEs (KEV-listed or high-EPSS) deserve priority attention — every sentence citing the specific component, version and CVE/KEV/EPSS record behind it, the same evidence-citing rule SoftWSP applies to every report it produces. An engineer reviews every finding before it ships. If a changed component's version alone doesn't explain a known fix, that is flagged for an analyst to take further with function-level diffing tools — SoftWSP does not claim its automated scan performs that deeper structural comparison itself.
See our OWASP Firmware Security Testing Methodology guide for where this kind of component-level comparison fits into a full testing workflow, or device & firmware security services for getting a specific firmware update diffed.
This guide draws on the BinDiff manual (zynamics/Google), binwalk's README (ReFirmLabs), Brumley et al.'s 2008 IEEE S&P paper, NIST SP 800-40r4 and CISA's KEV catalog, read directly 2026-11-09.
Put this guide to work
Frequently asked questions
What is firmware binary diffing, and why does it matter for n-day vulnerabilities?
Firmware binary diffing compares two versions of the same firmware image — usually a currently deployed release against a newly published update — at the function and basic-block level to find exactly what changed, because vendor release notes routinely say "security improvements" without naming the fixed vulnerability. The diff itself becomes the only public evidence of what was actually wrong, which is also why it matters for attackers: once a patch is public, diffing it against the pre-patch image can point straight at the vulnerable code path, turning an undisclosed bug into a practical, working n-day exploit for anyone still running the old image.
How does a tool like BinDiff actually identify which function changed?
BinDiff does not compare raw bytes or assembly instructions directly, since a recompile can shift every address without changing any logic. Its own manual describes a structural approach instead: "every function gets a signature, based on the structure of the (normalized) flow graph of the function," built from "number of codeblocks, number of edges between codeblocks, number of calls to subfunctions"; functions whose signature is unique in both binaries become initial matches, and the tool then "uses callgraphs... to generate more matches," drilling down to basic-block-level comparison inside each matched function pair. A function with a structurally identical signature in both images is unchanged; one whose flow graph changed shape between the pre-patch and post-patch build is exactly the function to look at first.
What is the role of binwalk if the actual comparison is done by a different tool?
binwalk doesn't diff anything; it unpacks. Its own README describes it as a tool to "identify, and optionally extract, files and data that have been embedded inside of other files," which is the step that has to happen before a function-level diff is even possible — pulling the kernel, bootloader and individual binaries out of two full firmware images so the same named executable in each can be loaded side by side into a comparison tool. Skipping that step and diffing the raw firmware blobs directly mostly just finds that compressed filesystem headers moved, not that a function changed.
Can binary diffing alone turn a patch into a working exploit?
Diffing identifies and narrows down *where* a fix landed; turning that into a working exploit is separate, harder work, but the two are closer together than most teams assume. Brumley, Poosankam, Song and Zheng's 2008 IEEE Symposium on Security and Privacy paper, "Automatic Patch-Based Exploit Generation is Possible: Techniques and Implications," demonstrated that an automated system comparing a patched binary against its pre-patch version could reliably reconstruct a usable exploit for the vulnerability the patch fixed — which is the concrete, published reason "the vendor didn't explain the CVE" is not the safety margin it looks like, and why CISA's Known Exploited Vulnerabilities catalog exists to track which gaps are already being hit in practice rather than which ones a vendor chose to describe.
Does SoftWSP run automated binary function-level diffing (BinDiff-style matching) on firmware?
No. SoftWSP's automated pipeline identifies the software components and versions present inside each firmware image (the same binary-analysis process our firmware SBOM guide covers) and matches each one against known CVE, CISA KEV and FIRST EPSS data, across both the before and after image, so an engineer can see which components changed version and which vulnerabilities that change actually closed. Function-level, BinDiff-style structural diffing to pinpoint the exact instructions a patch touched is a specialist analyst workflow this guide describes, not something SoftWSP's product runs automatically — the gap between "this component's version changed" and "this specific function was rewritten to fix a bug" still needs a human analyst with a tool like BinDiff or Diaphora.
Sources
- zynamics/Google: BinDiff Manual — Understanding BinDiff (matching algorithm)
- ReFirmLabs: binwalk — Firmware Analysis Tool (GitHub README)
- D. Brumley, P. Poosankam, D. Song, J. Zheng, "Automatic Patch-Based Exploit Generation is Possible: Techniques and Implications," 2008 IEEE Symposium on Security and Privacy
- NIST SP 800-40r4: Guide to Enterprise Patch Management Planning (April 2022, Final)
- CISA: Known Exploited Vulnerabilities (KEV) Catalog
About this guide
SoftWSP Firmware Security Desk
Covers the Firmware vulnerabilities & fixes cluster: 100 guides.

In this cluster
Questions about this page?
