Skip to content
Memory corruption Advisory Advanced

Wireshark LBMC Fragment Reassembly Integer Overflow Remote Code Execution Vulnerability

Wireshark's LBMC fragment reassembly code did not properly validate user-supplied data, leading to an integer overflow before a memory write. A remote attacker could exploit this to execute arbitrary code in the context of the Wireshark process, but only when LBMC fragment reassembly is enabled.

HeeChan Kim Follow

Originally disclosed on Zero Day Initiative

High 7.5 View original

This vulnerability allows remote attackers to execute arbitrary code on affected installations of Wireshark. Authentication is not required to exploit this vulnerability.

HeeChan Kim (@heegong123) of TeamH4C, on the Zero Day Initiative

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely an integer overflow in the LBMC fragment reassembly logic caused by missing validation of fragment length or offset values before a memory write.

Impact

A remote, unauthenticated attacker could execute arbitrary code in the context of the Wireshark process, though only instances with LBMC fragment reassembly enabled are affected.

What the attacker needed

LBMC fragment reassembly enabled; attacker can send crafted traffic

The fix

The vendor fixed the flaw in versions 4.6 and 4.4, as shown by the linked commits.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Wireshark is a program for inspecting network traffic. When it rebuilds a message that was split into pieces (fragments), it did not check the numbers describing those pieces carefully enough, so a crafted packet could make an internal size calculation wrap around and memory could be written in the wrong place. An attacker who can send traffic to a machine running Wireshark could then run their own code on it, but only if that optional fragment-rebuilding feature is switched on.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by HeeChan Kim

View all

2 more disclosed reports, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.