< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] Timer vulnerability


Alan,

I presume the scenario you described is very real and is possible to happen to QueryPerformanceCounter() and the likes, but GetTickCount()? Although I have verify this myself, MSDN library clearly states that GetTickCount() returns the number of *milliseconds* that have elapsed since the system was started (note that it also says on WinCE, it excludes time suspended, but I failed to find similar statement regarding other windows families).

Ken

Alan Hawrylyshen wrote:

One of the BIG problems with GetTickCount and families is that they no longer produce monotonically increasing results. On devices with Intel SpeedStep technology (for example) or other power management technologies, the TickCount can move in very unpredictable ways. This results is wildly inaccurate timers. Care must be taken to select a replacement (if done) that does not make use of a fundamental that varies non-linearly. On a plus side, we can get rid of any direct calls to time() since having a contained Time utility class is a Good Thing™.

Alan

a l a n a t j a s o m i d o t c o m