<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Arial Narrow";
        panose-1:2 11 6 6 2 2 2 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=RU link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi, Simon<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Faced with dnsmasq crash on aarch64 (32bit userspace, arm-buildroot-linux-gnueabi-gcc 5.3.0) with dhcpv6 stateful configured.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Unaligned packet’s req_addr is used in lease6_allocate() for struct copy since 2.67test15 (commit 89500e31f199e9ae1eadc86213b911ff44d30d6f).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>As for other places, seems well-aligned stack-local vars are used.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Please refer proposed patch attached and gdb trace:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Program received signal SIGBUS, Bus error.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>0x0003f990 in lease6_allocate (addrp=0xa55e6, lease_type=32) at lease.c:822<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>822           lease->addr6 = *addrp;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(gdb) bt<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#0  0x0003f990 in lease6_allocate (addrp=0xa55e6, lease_type=32) at lease.c:822<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#1  0x00055fac in update_leases (state=0xfffef8ac, context=0xa7ee8, addr=0xa55e6, lease_time=900, now=14609) at rfc3315.c:1825<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#2  0x00055ab4 in add_address (state=0xfffef8ac, context=0xa7ee8, lease_time=900, ia_option=0xa55e2, min_time=0xfffef6d0, addr=0xa55e6, now=14609) at rfc3315.c:1684<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#3  0x00053764 in dhcp6_no_relay (state=0xfffef8ac, msg_type=3, inbuff=0xa55a8, sz=128, is_unicast=0, now=14609) at rfc3315.c:938<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#4  0x00051744 in dhcp6_maybe_relay (state=0xfffef8ac, inbuff=0xa55a8, sz=128, client_addr=0xfffef9a0, is_unicast=0, now=14609) at rfc3315.c:172<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#5  0x000513b8 in dhcp6_reply (context=0xa7ee8, interface=23, iface_name=0xfffef978, fallback=0xfffef9f8, ll_addr=0xfffefa18, ula_addr=0xfffefa28, sz=128, client_addr=0xfffef9a0,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>    now=14609) at rfc3315.c:103<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#6  0x0004f4b4 in dhcp6_packet (now=14609) at dhcp6.c:233<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>#7  0x00038c78 in main (argc=3, argv=0xfffefd34) at dnsmasq.c:1099<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:9.0pt;font-family:"Arial Narrow",sans-serif;mso-fareast-language:RU'>Best Regards, Vladislav Grishenko</span><span lang=EN-US style='font-size:9.0pt;mso-fareast-language:RU'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>