Skip to content

Memory access out of bounds#209

Merged
kimlaine merged 3 commits intomicrosoft:contribfrom
s0l0ist:fix-oob
Aug 28, 2020
Merged

Memory access out of bounds#209
kimlaine merged 3 commits intomicrosoft:contribfrom
s0l0ist:fix-oob

Conversation

@s0l0ist
Copy link
Contributor

@s0l0ist s0l0ist commented Aug 28, 2020

When using SEAL without SecureZeroMemory, explicit_bzero, or explicit_memset, the code will throw an exception when seal_memzero is called.

In seal_memzero the code will never exit the loop, causing an OOB exception:

            volatile SEAL_BYTE *data_ptr = reinterpret_cast<SEAL_BYTE *>(data);
            size_t i = 0;
            while (i < size) // <------ `i` is never incremented, loop never exits
            {
                *data_ptr++ = static_cast<SEAL_BYTE>(0);  // <---- OOB exception
            }

@ghost
Copy link

ghost commented Aug 28, 2020

CLA assistant check
All CLA requirements met.

@kimlaine kimlaine merged commit ceebe98 into microsoft:contrib Aug 28, 2020
@s0l0ist s0l0ist deleted the fix-oob branch August 28, 2020 19:43
Rcontre360 pushed a commit to Rcontre360/SEAL that referenced this pull request Apr 17, 2025
…#209)

* refactor: remove duplicate dot functions

* use const ref

Co-authored-by: Bogdan Cebere <bogdan.cebere@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants