mirror of https://github.com/meshcore-dev/MeshCore
Browse Source
The path_len field inside decrypted PATH payloads was validated against the decrypted buffer size but not against MAX_PATH_SIZE (64). A malicious contact could send a PATH packet with path_len up to 178, overflowing out_path[64] in onPeerPathRecv and packet->path[64] in sendDirect. Add a MAX_PATH_SIZE check after parsing path_len from the decrypted PATH payload. Also add defensive bounds checks in sendDirect for both the TRACE payload-append path and the normal path-copy path.pull/1662/head
1 changed files with 12 additions and 0 deletions
Loading…
Reference in new issue