]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mac802154: Fix MAC header and payload encrypted
authorDiogenes Pereira <dvnp@cesar.org.br>
Tue, 5 Sep 2017 12:18:04 +0000 (09:18 -0300)
committerStefan Schmidt <stefan@osg.samsung.com>
Wed, 20 Sep 2017 11:37:16 +0000 (13:37 +0200)
commit3e4962667efb0f6c09fa3111e6ee53838118b227
treeedff991e3f4004d4965afed65bd6cc74fd195885
parent91f4aa977947f046dc144fa9e3b06f0ffb53be79
mac802154: Fix MAC header and payload encrypted

According to  802.15.4-2003/2006/2015 specifications the MAC frame is
composed of MHR, MAC payload and MFR and just the outgoing MAC payload
must be encrypted.

If communication is secure,sender build Auxiliary Security Header(ASH),
insert it next to the standard MHR header with security enabled bit ON,
and secure frames before transmitting them. According to the information
carried within the ASH, recipient retrieves the right cryptographic key
and correctly un-secure MAC frames.

The error scenario occurs on Linux using IEEE802154_SCF_SECLEVEL_ENC(4)
security level when llsec_do_encrypt_unauth() function builds theses MAC
frames incorrectly. On recipients these MAC frames are discarded,logging
"got invalid frame" messages.

Signed-off-by: Diogenes Pereira <dvnp@cesar.org.br>
Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
net/mac802154/llsec.c