mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[FILESYSTEMS] Fix pool memory disclosure in NtQueryAttributesFile handlers (#2926)
Fix pool memory disclosure caused by alignment bytes at the end of the _FILE_BASIC_INFORMATION structure
This commit is contained in:
parent
35dbdaaa0e
commit
ede7a20a17
4 changed files with 9 additions and 1 deletions
|
@ -899,6 +899,8 @@ Return Value:
|
|||
// We only support creation, last modify and last write times on Cdfs.
|
||||
//
|
||||
|
||||
RtlZeroMemory(Buffer, sizeof(FILE_BASIC_INFORMATION));
|
||||
|
||||
Buffer->LastWriteTime.QuadPart =
|
||||
Buffer->CreationTime.QuadPart =
|
||||
Buffer->ChangeTime.QuadPart = Fcb->CreationTime;
|
||||
|
|
|
@ -293,6 +293,8 @@ VfatGetBasicInformation(
|
|||
if (*BufferLength < sizeof(FILE_BASIC_INFORMATION))
|
||||
return STATUS_BUFFER_OVERFLOW;
|
||||
|
||||
RtlZeroMemory(BasicInfo, sizeof(FILE_BASIC_INFORMATION));
|
||||
|
||||
if (vfatVolumeIsFatX(DeviceExt))
|
||||
{
|
||||
FsdDosDateTimeToSystemTime(DeviceExt,
|
||||
|
|
|
@ -107,6 +107,8 @@ NtfsGetBasicInformation(PFILE_OBJECT FileObject,
|
|||
if (*BufferLength < sizeof(FILE_BASIC_INFORMATION))
|
||||
return STATUS_BUFFER_TOO_SMALL;
|
||||
|
||||
RtlZeroMemory(BasicInfo, sizeof(FILE_BASIC_INFORMATION));
|
||||
|
||||
BasicInfo->CreationTime.QuadPart = FileName->CreationTime;
|
||||
BasicInfo->LastAccessTime.QuadPart = FileName->LastAccessTime;
|
||||
BasicInfo->LastWriteTime.QuadPart = FileName->LastWriteTime;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* PROJECT: ReiserFs file system driver for Windows NT/2000/XP/Vista.
|
||||
* FILE: fileinfo.c
|
||||
* PURPOSE:
|
||||
* PROGRAMMER: Mark Piper, Matt Wu, Bo Brantén.
|
||||
* PROGRAMMER: Mark Piper, Matt Wu, Bo Brantén.
|
||||
* HOMEPAGE:
|
||||
* UPDATE HISTORY:
|
||||
*/
|
||||
|
@ -140,6 +140,8 @@ RfsdQueryInformation (IN PRFSD_IRP_CONTEXT IrpContext)
|
|||
}
|
||||
|
||||
FileBasicInformation = (PFILE_BASIC_INFORMATION) Buffer;
|
||||
|
||||
RtlZeroMemory(FileBasicInformation, sizeof(FILE_BASIC_INFORMATION));
|
||||
|
||||
FileBasicInformation->CreationTime = RfsdSysTime(Fcb->Inode->i_ctime);
|
||||
|
||||
|
|
Loading…
Reference in a new issue