From 4f7e9dc2ed76e4b488138af71d7d93bc0c50ca44 Mon Sep 17 00:00:00 2001 From: Serge Gautherie <32623169+SergeGautherie@users.noreply.github.com> Date: Thu, 19 Jun 2025 12:23:32 +0200 Subject: [PATCH] [NTOS:PS] Fix NtQueryInformationProcess(ProcessImageInformation) (#8134) Do not overwrite Status failure value. Addendum to commit bf493b93a (r59859). --- ntoskrnl/ps/query.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ntoskrnl/ps/query.c b/ntoskrnl/ps/query.c index 506497c1a17..2c344e9441b 100644 --- a/ntoskrnl/ps/query.c +++ b/ntoskrnl/ps/query.c @@ -889,6 +889,9 @@ NtQueryInformationProcess( /* Set the length required and validate it */ Length = sizeof(SECTION_IMAGE_INFORMATION); + /* Indicate success */ + Status = STATUS_SUCCESS; + /* Enter SEH to protect write */ _SEH2_TRY { @@ -900,9 +903,6 @@ NtQueryInformationProcess( Status = _SEH2_GetExceptionCode(); } _SEH2_END; - - /* Indicate success */ - Status = STATUS_SUCCESS; break; case ProcessDebugObjectHandle: