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

InetAddress.getLocalHost fails if hostname larger HOST_NAME_MAX.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 7
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux_redhat_5.0

      Description

      A CU reported a case which causes bufferoverflow.

      REPRODUCE:
      1. Set hostname length longer than 65

      ex.
      localrh64.a12345678.b12345678.c12345678.d12345678.e12345678.abcdefghijklmn.abcdefghijklmn.abcdefghijklmn.abcdefghijklmn.abcdefghijklmn.abcdefghijklmn.abcdefghijklmn.abcdefghijklmn.abcdefghijklmn

      2. Execute attached test program

      $ java -version
      java version "1.7.0_01"
      Java(TM) SE Runtime Environment (build 1.7.0_01-b04)
      Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)

      $ java -Djava.net.preferIPv4Stack=true Inet
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00002aaaab346a2e, pid=7230, tid=1095264576

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmocek Darryl Mocek
              Reporter:
              tbaba Tadayuki Baba (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: