Files
bitchat-android/app
OviandGitHub 5b0a7d0ce9 fix: add input validation for protocol decoding and fragment reassembly (#666)
* fix: add input validation for protocol decoding and fragment reassembly

* fix:subtract the old entry's size before adding the new one, so duplicate/retransmitted fragments don't inflate the counter

* fix: FragmentManager.handleFragment() can be entered concurrently (e.g., fragments for the same fragmentID arriving from multiple peers/relays). In order for this to happen multiple devices would be needed to connect to the mesh. even with a per-fragmentID byte cap, an attacker could open many fragment IDs at once and force the device to buffer lots of fragment data overall (risking memory pressure/OOM). In this fix we made fragments atomic and thread safe. When a fragment index is retransmitted, we compute the size delta (new - old) so duplicates don’t inflate counters and can’t be used to bypass limits. Under heavy load/attack the app will drop/reject fragment sets earlier instead of growing memory usage without bound to reduce risk of oom. tested on pixel 6 and pixel 8.

* fix: add fragmenttest
2026-03-26 16:24:29 +01:00
..
2026-02-01 13:33:22 +01:00
2025-12-14 21:55:41 +07:00