Bug Report: Unaligned Access in BGP Code on ARMv7 Platforms

Ondrej Zajicek santiago at crfreenet.org
Mon Dec 16 18:08:23 CET 2024


On Mon, Dec 16, 2024 at 05:43:16PM +0100, nick wrote:
> Dear all,
> 
> Apologies for the earlier confusion—my toolchain was misconfigured, and I
> mistakenly compiled the unpatched BIRD sources. Upon correcting this, I
> believe the first patch already addresses the issue. However, I noticed that
> the two patches result in different alignments. Below is a summary of the
> observed alignments:
> 
> *No Patch:*
> |ALIGN: 8 4 4 4 8|
> 
> *First Patch (fix-net-addr-alignment.patch):*
> |ALIGN: 2 4 4 4 4|
> 
> *Last Patch (net-addr-u32-align.patch):*
> |ALIGN: 4 4 4 4 4|

Hi

I suspected that the second crash was also on the unpatched binary :-).
The last patch (net-addr-u32-align.patch) is a better way to handle this
issue, although not perfect (you could possibly get a crash when VPN
network types are used, but not with regular IP network types).

We are working on thorough review of alignment issues as there were
some other issues on armhf in BIRD 3 development. Note that armhf is
likely the worst case for alignment issues, as it requires 8B alignment
for u64 but 4B alignment for pointers.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
"To err is human -- to blame it on a computer is even more so."



More information about the Bird-users mailing list