https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f9739601b380b9bd8ab43…
commit f9739601b380b9bd8ab43d8fa87c940c65517d94
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Fri Oct 5 15:09:27 2018 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Fri Oct 5 15:09:27 2018 +0200
[DEVMGR] Hackfix CORE-5643
---
dll/win32/devmgr/devmgmt/DeviceView.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dll/win32/devmgr/devmgmt/DeviceView.cpp b/dll/win32/devmgr/devmgmt/DeviceView.cpp
index 4be0c2e75f..690609c73c 100644
--- a/dll/win32/devmgr/devmgmt/DeviceView.cpp
+++ b/dll/win32/devmgr/devmgmt/DeviceView.cpp
@@ -1206,6 +1206,11 @@ CDeviceView::RefreshDeviceList()
// create a new device node and add it to the list
DeviceNode = new CDeviceNode(DeviceInfoData.DevInst, &m_ImageListData);
+ /* FIXME: Start of Hack for CORE-5643 */
+ if (!DeviceNode->IsInstalled())
+ continue;
+ /* FIXME: End of Hack for CORE-5643 */
+
if (DeviceNode->SetupNode())
{
m_DeviceNodeList.AddTail(DeviceNode);
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0b713d4fa0781ecce0367…
commit 0b713d4fa0781ecce03673ce9b3eb64d7a683382
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Fri Oct 5 10:49:11 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Fri Oct 5 10:49:59 2018 +0200
[NTOSKRNL] On open, verify and validate the hint device object if any
---
ntoskrnl/io/iomgr/file.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/io/iomgr/file.c b/ntoskrnl/io/iomgr/file.c
index c14e61806b..d8bb852606 100644
--- a/ntoskrnl/io/iomgr/file.c
+++ b/ntoskrnl/io/iomgr/file.c
@@ -673,10 +673,16 @@ IopParseDevice(IN PVOID ParseObject,
}
}
+ /* If we have a top level device hint, verify it */
if (OpenPacket->InternalFlags & IOP_USE_TOP_LEVEL_DEVICE_HINT)
{
- // FIXME: Verify our device object is good to use
- ASSERT(DirectOpen == FALSE);
+ Status = IopCheckTopDeviceHint(&DeviceObject, OpenPacket, DirectOpen);
+ if (!NT_SUCCESS(Status))
+ {
+ IopDereferenceDeviceObject(OriginalDeviceObject, FALSE);
+ if (Vpb) IopDereferenceVpbAndFree(Vpb);
+ return Status;
+ }
}
/* If we traversed a mount point, reset the information */
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=670a7ac7188f4912a48a5…
commit 670a7ac7188f4912a48a50bae4d275f2f21e1810
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Fri Oct 5 10:39:50 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Fri Oct 5 10:49:59 2018 +0200
[NTOSKRNL] In IoGetRelatedDeviceObject(), validate hint is on the stack before returning it
---
ntoskrnl/io/iomgr/device.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/io/iomgr/device.c b/ntoskrnl/io/iomgr/device.c
index 189e47b71b..416a16e6aa 100644
--- a/ntoskrnl/io/iomgr/device.c
+++ b/ntoskrnl/io/iomgr/device.c
@@ -6,6 +6,7 @@
* PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
* Filip Navara (navaraf(a)reactos.org)
* Hervé Poussineau (hpoussin(a)reactos.org)
+ * Pierre Schweitzer
*/
/* INCLUDES *******************************************************************/
@@ -1387,8 +1388,10 @@ IoGetRelatedDeviceObject(IN PFILE_OBJECT FileObject)
/* Cast the buffer to something we understand */
FileObjectExtension = FileObject->FileObjectExtension;
- /* Check if have a replacement top level device */
- if (FileObjectExtension->TopDeviceObjectHint)
+ /* Check if have a valid replacement top level device */
+ if (FileObjectExtension->TopDeviceObjectHint &&
+ IopVerifyDeviceObjectOnStack(DeviceObject,
+ FileObjectExtension->TopDeviceObjectHint))
{
/* Use this instead of returning the top level device */
return FileObjectExtension->TopDeviceObjectHint;