mirror of
https://github.com/winfsp/winfsp.git
synced 2026-10-29 22:54:13 -05:00
sys: FspFsvolQueryStreamInformationCopy: fix vulnerability reported by Abhinav Agarwal (GitHub @abhinavagarwal07)
Correct bounds checking on FSP_FSCTL_STREAM_INFO records.
This commit is contained in:
1 parent
1916d9bf06
commit
a744d6f24c
1 file changed
+2
-1
+2
-1
@@ -669,7 +669,8 @@ static NTSTATUS FspFsvolQueryStreamInformationCopy(
|
||||
{
|
||||
StreamInfoSize = StreamInfo->Size;
|
||||
|
||||
if (sizeof(FSP_FSCTL_STREAM_INFO) > StreamInfoSize)
|
||||
if (sizeof(FSP_FSCTL_STREAM_INFO) > StreamInfoSize ||
|
||||
(SIZE_T)(StreamInfoEnd - (PUINT8)StreamInfo) < StreamInfoSize)
|
||||
break;
|
||||
|
||||
StreamNameLength = StreamInfoSize - sizeof(FSP_FSCTL_STREAM_INFO) + STREAM_EXTRA_LENGTH;
|
||||
|
||||
Reference in new issue
Block a user