[FILESYSTEMS] Fix pool memory disclosure in filesystem drivers supporting FS_INFORMATION_CLASS.FileFsVolumeInformation (#2975)

* FileFsVolumeInformation-memory-disclosure

* remove unnecessary assignment to 0

* fix
This commit is contained in:
Nguyen Trung Khanh 2020-09-11 19:51:35 +07:00 committed by GitHub
parent ede7a20a17
commit 166f815e7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 7 deletions

View file

@ -4546,6 +4546,10 @@ NTSTATUS nfs41_QueryVolumeInformation(
status = check_nfs41_dirquery_args(RxContext);
if (status) goto out;
#ifdef __REACTOS__
RtlZeroMemory(RxContext->Info.Buffer, RxContext->Info.LengthRemaining);
#endif // __REACTOS__
switch (InfoClass) {
case FileFsVolumeInformation:
if ((ULONG)RxContext->Info.LengthRemaining >= DevExt->VolAttrsLen) {