Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8255566

Add size validation when parsing values from VersionProps

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 16
    • 17
    • hotspot
    • b21

    Description

      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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: