From: Jouni Malinen Date: Sat, 23 Feb 2019 11:54:33 +0000 (+0200) Subject: UBSan: Pack MACsec peer id structure X-Git-Tag: hostap_2_8~328 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abde4eba45ac06eeb1a344b8a9a8ab946e1de5de;p=thirdparty%2Fhostap.git UBSan: Pack MACsec peer id structure This is needed to avoid an UBSan warning and since this struct is used as part of a message construction, it needs to be packed anyway to guarantee correct functionality. ieee802_1x_kay.c:1021:3: runtime error: member access within misaligned address 0x0000031921e2 for type 'struct ieee802_1x_mka_peer_id', which requires 4 byte alignment Signed-off-by: Jouni Malinen --- diff --git a/src/pae/ieee802_1x_kay_i.h b/src/pae/ieee802_1x_kay_i.h index 1d1589cb6..f9cd3f41b 100644 --- a/src/pae/ieee802_1x_kay_i.h +++ b/src/pae/ieee802_1x_kay_i.h @@ -39,7 +39,7 @@ struct ieee802_1x_kay; struct ieee802_1x_mka_peer_id { u8 mi[MI_LEN]; be32 mn; -}; +} STRUCT_PACKED; struct ieee802_1x_kay_peer { struct ieee802_1x_mka_sci sci;