Locking Bug in Client for Vista 2
Client for Vista v1 and v2 have a locking bug:
1) CreateFile("test.dat", /*read/write, sharing, etc */)
2) LockFile( /* offset >= 4GB, number of bytes to lock can be 1 */)
3) UnlockFile() // this unlock works
4) LockFile( do the same as step #2)
5) UnlockFile() // this unlock appears to succeed but no unlock takes place
6) Any other process that attempts to lock the same region at this point will get a ERROR_LOCK_VIOLATION
7) CloseFile() // Now the lock is cleared.
Summary:
Every other unlock call appears to succeed but actually fails/does nothing
Lock region offset >= 4GB
Client32 doesn't have this problem
Server is Netware 6.5
Demonstration C program source attached
|