Author: tfaber
Date: Wed Apr 19 11:46:34 2017
New Revision: 74374
URL:
http://svn.reactos.org/svn/reactos?rev=74374&view=rev
Log:
[KMTESTS:NPFS]
- Remove tests that cause pool buffer overflows. NtQueryVolumeInformationFile does not
validate buffer length for kernel mode callers, so passing an invalid length is not a good
test.
CORE-11474
Modified:
trunk/rostests/kmtests/npfs/NpfsVolumeInfo.c
Modified: trunk/rostests/kmtests/npfs/NpfsVolumeInfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/npfs/NpfsVolumeIn…
==============================================================================
--- trunk/rostests/kmtests/npfs/NpfsVolumeInfo.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/npfs/NpfsVolumeInfo.c [iso-8859-1] Wed Apr 19 11:46:34 2017
@@ -81,37 +81,11 @@
ok_eq_ulong(FileFsSizeInfo.BytesPerSector, 1);
ok_eq_ulong(IoStatusBlock.Information, sizeof(FileFsSizeInfo));
- RtlFillMemory(&FileFsSizeInfo, sizeof(FileFsSizeInfo), 0xFF);
- Status = ZwQueryVolumeInformationFile(ServerHandle,
- &IoStatusBlock,
- &FileFsSizeInfo,
- sizeof(FileFsSizeInfo) - 4,
- FileFsSizeInformation);
- ok_eq_hex(Status, STATUS_SUCCESS);
- ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS);
- ok_eq_longlong(FileFsSizeInfo.TotalAllocationUnits.QuadPart, 0);
- ok_eq_longlong(FileFsSizeInfo.AvailableAllocationUnits.QuadPart, 0);
- ok_eq_ulong(FileFsSizeInfo.SectorsPerAllocationUnit, 1);
- ok_eq_ulong(FileFsSizeInfo.BytesPerSector, 1);
- ok_eq_ulong(IoStatusBlock.Information, sizeof(FileFsSizeInfo));
-
RtlFillMemory(&FileFsDeviceInfo, sizeof(FileFsDeviceInfo), 0xFF);
Status = ZwQueryVolumeInformationFile(ServerHandle,
&IoStatusBlock,
&FileFsDeviceInfo,
sizeof(FileFsDeviceInfo),
- FileFsDeviceInformation);
- ok_eq_hex(Status, STATUS_SUCCESS);
- ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS);
- ok_eq_ulong(FileFsDeviceInfo.Characteristics, 0);
- ok_eq_ulong(FileFsDeviceInfo.DeviceType, FILE_DEVICE_NAMED_PIPE);
- ok_eq_ulong(IoStatusBlock.Information, sizeof(FileFsDeviceInfo));
-
- RtlFillMemory(&FileFsDeviceInfo, sizeof(FileFsDeviceInfo), 0xFF);
- Status = ZwQueryVolumeInformationFile(ServerHandle,
- &IoStatusBlock,
- &FileFsDeviceInfo,
- sizeof(FileFsDeviceInfo) - 4,
FileFsDeviceInformation);
ok_eq_hex(Status, STATUS_SUCCESS);
ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS);
@@ -163,21 +137,6 @@
ok_eq_ulong(FileFsFullSizeInfo.SectorsPerAllocationUnit, 0);
ok_eq_ulong(FileFsFullSizeInfo.BytesPerSector, 0);
ok_eq_ulong(IoStatusBlock.Information, sizeof(FileFsFullSizeInfo));
-
- RtlFillMemory(&FileFsFullSizeInfo, sizeof(FileFsFullSizeInfo), 0xFF);
- Status = ZwQueryVolumeInformationFile(ServerHandle,
- &IoStatusBlock,
- &FileFsFullSizeInfo,
- sizeof(FileFsFullSizeInfo) - 4,
- FileFsFullSizeInformation);
- ok_eq_hex(Status, STATUS_SUCCESS);
- ok_eq_hex(IoStatusBlock.Status, STATUS_SUCCESS);
- ok_eq_longlong(FileFsFullSizeInfo.TotalAllocationUnits.QuadPart, 0);
- ok_eq_longlong(FileFsFullSizeInfo.CallerAvailableAllocationUnits.QuadPart, 0);
- ok_eq_longlong(FileFsFullSizeInfo.ActualAvailableAllocationUnits.QuadPart, 0);
- ok_eq_ulong(FileFsFullSizeInfo.SectorsPerAllocationUnit, 0);
- ok_eq_ulong(FileFsFullSizeInfo.BytesPerSector, 0);
- ok_eq_ulong(IoStatusBlock.Information, sizeof(FileFsFullSizeInfo));
}
static KSTART_ROUTINE RunTest;