Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory access out of bounds #209

Merged
merged 3 commits into from
Aug 28, 2020
Merged

Memory access out of bounds #209

merged 3 commits into from
Aug 28, 2020

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
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