https://git.reactos.org/?p=reactos.git;a=commitdiff;h=16752875db9487a82b04a1...
commit 16752875db9487a82b04a1170ba714f955c38979 Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Sun Oct 21 18:12:08 2018 +0200 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Sun Oct 21 18:12:08 2018 +0200
[NTOS:CM] Add extra validation for the information class parameter in NtEnumerateValueKey(). --- ntoskrnl/config/ntapi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/ntoskrnl/config/ntapi.c b/ntoskrnl/config/ntapi.c index 02ec9b1234..7a5376f02c 100644 --- a/ntoskrnl/config/ntapi.c +++ b/ntoskrnl/config/ntapi.c @@ -551,14 +551,18 @@ NtEnumerateValueKey(IN HANDLE KeyHandle, PCM_KEY_BODY KeyObject; REG_ENUMERATE_VALUE_KEY_INFORMATION EnumerateValueKeyInfo; REG_POST_OPERATION_INFORMATION PostOperationInfo; + PAGED_CODE(); + DPRINT("NtEnumerateValueKey() KH 0x%p, Index 0x%x, KVIC %d, Length %lu\n", KeyHandle, Index, KeyValueInformationClass, Length);
/* Reject classes we don't know about */ - if ((KeyValueInformationClass != KeyValueBasicInformation) && - (KeyValueInformationClass != KeyValueFullInformation) && - (KeyValueInformationClass != KeyValuePartialInformation)) + if ((KeyValueInformationClass != KeyValueBasicInformation) && + (KeyValueInformationClass != KeyValueFullInformation) && + (KeyValueInformationClass != KeyValuePartialInformation) && + (KeyValueInformationClass != KeyValueFullInformationAlign64) && + (KeyValueInformationClass != KeyValuePartialInformationAlign64)) { /* Fail */ return STATUS_INVALID_PARAMETER;