News: 0001648353

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 7.2-rc5 Fixing Longstanding Bug In IPv4 Networking Over Firewire

([Linux Networking] 5 Hours Ago IPv4 Over Firewire)


[1]Firewire still isn't dead yet on Linux. Current plans call for [2]maintaining IEEE-1394 Firewire on Linux at least through 2029 and with today's Linux 7.2-rc5 kernel release is a fix for those wanting to leverage IPv4 networking over Firewire.

RFC 2734 is the nearly thirty year old standard for IPv4 datagrams over IEEE-1394 Firewire. Mainlined since 2009 for their modern (at the time) IEEE-1394 driver stack has been the "fw-ipv4" driver to provide this IPv4 support. But it turns out that since then there has been a notable bug in this driver.

Seventeen years after this IPv4 Firewire driver was upstreamed, it was realized the driver fails to properly reassemble a complete datagram if it's stored across multiple buffer ranges in the list. Open-source developer Ruoyu Wang realized this notable bug in the Firewire networking code that has existed the entire time of this IPv4 Firewire support. Explaining in [3]the patch to fix it:

"Those neighbor lookups currently assume that the current fragment always has a real next or previous fragment. At a list edge, the next or previous entry is the list head, not a struct fwnet_fragment_info.

The gap checks also compare against the old edge of the current fragment instead of the edge after adding the new fragment. As a result, a fragment that bridges two existing ranges may leave two adjacent ranges unmerged, so fwnet_pd_is_complete() can miss a complete datagram.

Check for the list head before looking up the neighboring fragment, and compare the neighbor against the new fragment's far edge when deciding whether to merge all three ranges."

While Ruoyu Wang discovered this issue and patched this long-standing bug in the IPv4 Firewire driver to ensure proper datagram reassembly, it doesn't appear he is using IPv4 Firewire support at all. Rather he originally hit this bug via a static analysis checker and confirmed the behavior with code review.

[4]

Should anyone actually be using IPv4 Firewire in 2026+, the fix was merged this weekend via [5]this pull request ahead of Linux 7.2-rc5 due out later today.



[1] https://www.phoronix.com/search/Firewire

[2] https://www.phoronix.com/news/Linux-Firewire-New-Maintainer

[3] https://lore.kernel.org/all/20260707150454.2265951-1-ruoyuw560@gmail.com/

[4] https://www.phoronix.com/image-viewer.php?id=2026&image=firewire_networking_lrg

[5] https://lore.kernel.org/lkml/20260725110853.GA91435@sakamocchi.jp/



I'm having a MID-WEEK CRISIS!