Lunes 19 Octubre 2026 05:04:58 GMT+02:00

Netcrook

InicioManifiesto
Noticias
Techcrook
Geocrook
WikicrookEquipoAppContacto
EnglishItaliano

WIKICROOK

Buffer pre-allocation

Reserving memory in advance for incoming data, which can become risky if the size logic is not tightly controlled.

Buffer pre-allocation is the practice of reserving memory before all incoming data has arrived, so a parser or protocol handler has space ready to store it. This is common in network software, where messages may be split across packets and the code wants to avoid repeated reallocations.

In security terms, the risk is that the size decision is influenced by untrusted input or that the allocation is not fully released on error paths. An attacker can abuse that logic to trigger oversized allocations, keep buffers alive, or force repeated partial handshakes until the process runs out of memory. Defenders watch for tight bounds checks, consistent cleanup, and safe limits on connection and request volume. In TLS stacks and other parsers, secure pre-allocation must be paired with strict validation, because reserving memory too early can turn a normal parsing step into a denial-of-service weakness.

← índice WIKICROOK