Page MenuHome GnuPG

Stack corruption in _gcry_rndw32_gather_random_fast (w64)
Closed, ResolvedPublic

Description

Release:

libgcrypt 1.5.0

Enviroment:

Windows 7 x64 Professional
Visual Studio 2010

Description:

In rndw32.c, on line 890, minimumWorkingSetSize and maximumWorkingSetSize are
defined as DWORD.
On line 910, those two variables are passed to GetProcessWorkingSetSize(), which
expects pointers to SIZE_T.

When compiling for windows x64 with Visual Studio 2010, this results in a
corrupted stack.

FIX:
Change line 890 to:
SIZE_T minimumWorkingSetSize, maximumWorkingSetSize;

Details

Version
1.5.0

Event Timeline

MGtB set Version to 1.5.0.
MGtB added a subscriber: MGtB.
werner added a subscriber: werner.

Libgcrypt does not support 64 bit Windows yet. In particular do not use it even
if it would build and run fine. MSVC is not a supported build platform anyway.

werner claimed this task.