Bug Report: Unaligned Access in BGP Code on ARMv7 Platforms

nick vincent at systemli.org
Wed Dec 18 00:26:37 CET 2024


Hey,

I did a PR for the routing feed containing your latest patch [0]. I hope 
everything is alright. I'm looking forward to the BIRD 3 release. If I 
need to test something, I'm happy to help. I can also give you SSH 
access via IPv6 to an OpenWrt device for testing, if you'd like.

[0] - https://github.com/openwrt/routing/pull/1097

On 12/16/24 6:08 PM, Ondrej Zajicek wrote:
> 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.
>


More information about the Bird-users mailing list