Files
meshtastic_firmware/src/modules
nightjoker7andGitHub a6b1a69630 StoreForwardModule::historyAdd: memcpy source size, not buffer capacity (#10250)
`memcpy(... p.payload.bytes, meshtastic_Constants_DATA_PAYLOAD_LEN)`
reads past the actual payload when the incoming packet's payload is
shorter than `DATA_PAYLOAD_LEN` (237 bytes). The code just above
already records the correct size:

    this->packetHistory[...].payload_size = p.payload.size;

but then the memcpy ignores that and copies the full buffer capacity,
pulling uninitialized / adjacent memory bytes into the history entry.
Those extra bytes are later rebroadcast whenever the Store & Forward
module replays the packet.

Fix: memcpy using `p.payload.size` (the actual payload length) instead
of the constant buffer capacity.

Classification: bounded out-of-bounds READ into the protobuf scratch
buffer. Not directly exploitable for RCE (the destination buffer is
also DATA_PAYLOAD_LEN), but leaks adjacent memory into replayed
packets and is a latent correctness bug.
2026-04-22 21:04:37 -05:00
..
2026-03-06 05:34:41 -06:00
2022-02-27 02:21:02 -08:00
2022-02-27 01:49:24 -08:00
2026-02-19 07:16:33 -06:00
2026-02-19 07:16:33 -06:00
2026-02-19 07:16:33 -06:00
2026-02-19 07:16:33 -06:00
2026-02-19 07:16:33 -06:00
2026-02-19 07:16:33 -06:00