[1/2] mka: ICV not encoded correctly, causing receive side to drop MKPDU

Message ID 20180309205305.48783-1-msiedzik@extremenetworks.com
State New
Headers show
Series
  • [1/2] mka: ICV not encoded correctly, causing receive side to drop MKPDU
Related show

Commit Message

Michael Siedzik March 9, 2018, 8:53 p.m.
From: Mike Siedzik <msiedzik@extremenetworks.com>

The previously submitted "PATCH 06/15 mka: KaY setting Parameter Set
Body Length Incorrectly" introduced a new bug where
ieee802_1x_mka_encode_icv_body() encodes 4 fewer octets than required.

Thanks to Jaap Keuter <jaap.keuter@xs4all.nl> for finding this bug and
working with me to resolve it.

Signed-off-by: Michael Siedzik <msiedzik@extremenetworks.com>
---
 src/pae/ieee802_1x_kay.c | 2 --
 1 file changed, 2 deletions(-)
 mode change 100644 => 100755 src/pae/ieee802_1x_kay.c

--
2.11.1

Patch

diff --git a/src/pae/ieee802_1x_kay.c b/src/pae/ieee802_1x_kay.c
old mode 100644
new mode 100755
index 6ac7d02d1..9fa2c211f
--- a/src/pae/ieee802_1x_kay.c
+++ b/src/pae/ieee802_1x_kay.c
@@ -1746,8 +1746,6 @@  ieee802_1x_mka_encode_icv_body(struct ieee802_1x_mka_participant *participant,
                return -1;
        }

-       if (length != DEFAULT_ICV_LEN)
-               length -= MKA_HDR_LEN;
        os_memcpy(wpabuf_put(buf, MKA_ALIGN_LENGTH(length - MKA_HDR_LEN)), cmac, length - MKA_HDR_LEN);

        return 0;