Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/mesh/Router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ ErrorCode Router::send(meshtastic_MeshPacket *p)

if (!(p->which_payload_variant == meshtastic_MeshPacket_encrypted_tag ||
p->which_payload_variant == meshtastic_MeshPacket_decoded_tag)) {
// Error returns from here own the packet, as the position-precision path below does.
packetPool.release(p);
return meshtastic_Routing_Error_BAD_REQUEST;
}

Expand Down Expand Up @@ -633,7 +635,9 @@ bool checkXeddsaReceivePolicy(meshtastic_MeshPacket *p)
if (p->decoded.xeddsa_signature.size == XEDDSA_SIGNATURE_SIZE) {
meshtastic_NodeInfoLite_public_key_t senderKey = {0, {0}};
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->from);
if (nodeDB->copyPublicKey(p->from, senderKey)) {
// Authoritative keys only: verifying against an opportunistic cache key would let a planted
// key mark its own node a signer, the trust loop #11116 closed on the decrypt path.
if (nodeDB->copyPublicKeyAuthoritative(p->from, senderKey)) {
p->xeddsa_signed =
crypto->xeddsa_verify(senderKey.bytes, p->from, p->id, p->decoded.portnum, p->decoded.payload.bytes,
p->decoded.payload.size, p->decoded.xeddsa_signature.bytes);
Expand Down
Loading