Skip to content

Non scalar scanners overrun buffer #1

Description

@BlueAmulet

The AVX2 scanner reads 32bytes at once, so as chunk approaches the end of size, it ends up reading past the end of the buffer

for (size_t chunk = 0; chunk < size; chunk++) {
__m256i chunkData =
_mm256_loadu_si256((__m256i*)((char*)startAddr + chunk));

The SSE4.2 scanner also has the same issue.

for (size_t chunk = 0; chunk < size; chunk++) {
__m128i chunkData =
_mm_loadu_si128((__m128i*)((char*)startAddr + chunk));

This can cause crashes if there is no readable memory past the end of the buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions