Add size validation when parsing values from VersionProps

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: 16
    • Component/s: hotspot
    • b21

      java.lang.VersionProps defines a number of JDK version properties that are read by the VM and stored in JDK_Version or VM_Version. These values are read into fixed size buffers (thread.cpp):

      char java_version[64] = "";
      char java_runtime_name[128] = "";
      char java_runtime_version[128] = "";
      char java_runtime_vendor_version[128] = "";
      char java_runtime_vendor_vm_bug_url[128] = "";

      There is no guarantee that the value being read actually fits in these buffers.

      Update: we can bypass these buffers altogether - see comments

            Assignee:
            David Holmes
            Reporter:
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: