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

Add size validation when parsing values from VersionProps

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 16
    • 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

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

              Created:
              Updated:
              Resolved: