Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-7436

Crash on NtSetValueKey When Data is NULL, but DataSize is > 0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • NTCore

    Description

      When calling NtSetValueKey, if Data is NULL, DataSize must be 0.

      That combination of parameters should return STATUS_INVALID_PARAMETER, instead of attempting to continue, and crashing.

      Also provided a test case that checks different combinations of Data and DataSize. It's very ugly as it is, though.

      Attachments

        1. apitest-NtSetValueKey-wip.patch
          9 kB
        2. ntapi.c.patch
          0.8 kB
        3. ntsetvaluekey.patch
          5 kB
        4. ntsetvaluekey.patch
          4 kB
        5. ntsetvaluekey.patch
          5 kB

        Issue Links

          Activity

            People

              alex_ionescu Alex Ionescu
              gigaherz gigaherz
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: