mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 09:22:57 -05:00
sys: FspFsvolReadNonCached: trim ReadLength
During CreateProcess/CreateSection Windows locks the image file (using AcquireFileForNtCreateSection), gets the image file size and then reads the image file. Unfortunately if the file system (erroneously) reads past the file size, Windows can bugcheck. This allows a faulty or malicious file system to crash Windows. This commit adds a check in WinFsp to mitigate this problem.
This commit is contained in:
@ -1392,6 +1392,7 @@ typedef struct FSP_FILE_NODE
|
||||
PIRP TopLevelIrp;
|
||||
UINT32 TopFlags;
|
||||
} CcFlush;
|
||||
BOOLEAN CreateSection;
|
||||
} Tls;
|
||||
/* read-only after creation (and insertion in the ContextTable) */
|
||||
PDEVICE_OBJECT FsvolDeviceObject;
|
||||
|
Reference in New Issue
Block a user