Parent: 159101c7bc38da3b2ca2f791ccca4cedb8da8a0c
Author: Christian Eggers <ceggers@arri.de>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2025-07-15 17:23:23
Tree: dba52258ee65008d4373919eb6dac0ac3c824114
mesh: fix corrupted relay packets Currently, all relayed packets are broken! At the point when net_key_encrypt() is called from net_rx() for encrypting a relay packet, the packet size must include the NetMIC field. But the length of this field has already been removed during decryption of the incoming packet (by decrypt_net_pkt()), although mesh_crypto_packet_decrypt() has correctly reset the NetMIC field to zeroes. Move stripping of the NetMIC field length from decrypt_net_pkt() to mesh_crypto_packet_parse(), so that the field length is only stripped from the payload message (but keeping the field length for the network PDU). Additionally add extra length checks during parsing.
Diffstat
| M | mesh/crypto.c | | | 21 | +++++++++++++++++++++ |
| M | mesh/net-keys.c | | | 5 | +- - - - |
2 files changed, 22 insertions(+), 4 deletions(-)