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

Fix whitespace parsing in libjdwp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • core-svc
    • None
    • b24

      AddressSanitizer: heap-buffer-overflow on address 0x60d0000074f4 at pc 0x7ff1d9f94160 bp 0x7ff1da1f8180 sp 0x7ff1da1f8178
      READ of size 1 at 0x60d0000074f4 thread T1
          #0 0x7ff1d9f9415f in skipWhitespace src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c:34
          #1 0x7ff1d9f9415f in dbgsysExec src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c:91
          #2 0x7ff1d9faf949 in launch src/jdk.jdwp.agent/share/native/libjdwp/transport.c:455
          #3 0x7ff1d9faf949 in transport_startTransport src/jdk.jdwp.agent/share/native/libjdwp/transport.c:600
          #4 0x7ff1d9f78e6a in startTransport src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:522
          #5 0x7ff1d9f73880 in bagEnumerateOver src/jdk.jdwp.agent/share/native/libjdwp/bag.c:154
          #6 0x7ff1d9f7a402 in initialize src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:677
          #7 0x7ff1d9f7b3b5 in cbEarlyException src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:461
          #8 0x7ff1d6dc6147 in JvmtiExport::post_exception_throw(JavaThread*, Method*, unsigned char*, oopDesc*) src/hotspot/share/prims/jvmtiExport.cpp:2043
          #9 0x7ff1d6544673 in InterpreterRuntime::exception_handler_for_exception(JavaThread*, oopDesc*) src/hotspot/share/interpreter/interpreterRuntime.cpp:563
          #10 0x7ff1c4358b95 (<unknown module>)

      0x60d0000074f4 is located 0 bytes to the right of 132-byte region [0x60d000007470,0x60d0000074f4)
      allocated by thread T1 here:
          #0 0x7ff1daeb89cf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
          #1 0x7ff1d74b4367 in os::malloc(unsigned long, MEMFLAGS, NativeCallStack const&) src/hotspot/share/runtime/os.cpp:654
          #2 0x7ff1d74b4367 in os::malloc(unsigned long, MEMFLAGS) src/hotspot/share/runtime/os.cpp:622
          #3 0x7ff1d6d2bd34 in JvmtiEnvBase::allocate(long, unsigned char**) src/hotspot/share/prims/jvmtiEnvBase.hpp:255
          #4 0x7ff1d6d2bd34 in JvmtiEnv::Allocate(long, unsigned char**) src/hotspot/share/prims/jvmtiEnv.cpp:136
          #5 0x7ff1d6c58712 in jvmti_Allocate build/linux-x86_64-server-release/hotspot/variant-server/gensrc/jvmtifiles/jvmtiEnter.cpp:354
          #6 0x7ff1d9fb9a61 in jvmtiAllocate src/jdk.jdwp.agent/share/native/libjdwp/util.c:1776
          #7 0x7ff1d9f93ceb in dbgsysExec src/jdk.jdwp.agent/unix/native/libjdwp/exec_md.c:62
          #8 0x7ff1d9faf949 in launch src/jdk.jdwp.agent/share/native/libjdwp/transport.c:455
          #9 0x7ff1d9faf949 in transport_startTransport src/jdk.jdwp.agent/share/native/libjdwp/transport.c:600
          #10 0x7ff1d9f78e6a in startTransport src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:522
          #11 0x7ff1d9f73880 in bagEnumerateOver src/jdk.jdwp.agent/share/native/libjdwp/bag.c:154
          #12 0x7ff1d9f7a402 in initialize src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:677
          #13 0x7ff1d9f7b3b5 in cbEarlyException src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c:461
          #14 0x7ff1d6dc6147 in JvmtiExport::post_exception_throw(JavaThread*, Method*, unsigned char*, oopDesc*) src/hotspot/share/prims/jvmtiExport.cpp:2043
          #15 0x7ff1d6544673 in InterpreterRuntime::exception_handler_for_exception(JavaThread*, oopDesc*) src/hotspot/share/interpreter/interpreterRuntime.cpp:563
          #16 0x7ff1c4358b95 (<unknown module>)
          #17 0x7ff1c4354d01 (<unknown module>)
          #18 0x7ff1c435505d (<unknown module>)
          #19 0x7ff1c4337cc5 (<unknown module>)
          #20 0x7ff1d655f676 in JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*) src/hotspot/share/runtime/javaCalls.cpp:415
          #21 0x7ff1d682c904 in jni_invoke_static src/hotspot/share/prims/jni.cpp:887
          #22 0x7ff1d6837cb7 in jni_CallStaticVoidMethod src/hotspot/share/prims/jni.cpp:1711
          #23 0x7ff1db4eb49a in JavaMain src/java.base/share/native/libjli/java.c:547
          #24 0x7ff1db4f1708 in ThreadJavaMain src/java.base/unix/native/libjli/java_md.c:650
          #25 0x7ff1daca7fd3 in start_thread nptl/pthread_create.c:442

      Thread T1 created by T0 here:
          #0 0x7ff1dae49726 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:207
          #1 0x7ff1db4f33a1 in CallJavaMainInNewThread src/java.base/unix/native/libjli/java_md.c:691
          #2 0x7ff1db4ee22d in ContinueInNewThread src/java.base/share/native/libjli/java.c:2280
          #3 0x7ff1db4ef6ae in JLI_Launch src/java.base/share/native/libjli/java.c:340
          #4 0x556bc65c63bc in main src/java.base/share/native/launcher/main.c:166
          #5 0x7ff1dac46189 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

            kevinw Kevin Walls
            jcking Justin King
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: