From abde4eba45ac06eeb1a344b8a9a8ab946e1de5de Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 23 Feb 2019 13:54:33 +0200 Subject: [PATCH] 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 --- src/pae/ieee802_1x_kay_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;