Uploaded image for project: 'WildFly OpenSSL Natives'
  1. WildFly OpenSSL Natives
  2. SSLNTV-24

Segmentation fault in X509_STORE_add_lookup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None

      During a test, our container (running an image based on registry.access.redhat.com/ubi8/openjdk-11-runtime) crashed with a segmentation fault in X509_STORE_add_lookup:

      Current thread (0x0000564fcf0ae800):  JavaThread "non-blocking-thread--p2-t15" daemon [_thread_in_native, id=187, stack(0x00007f6ff30f9000,0x00007f6ff31fa000)]
      
      Stack: [0x00007f6ff30f9000,0x00007f6ff31fa000],  sp=0x00007f6ff31f73b0,  free space=1016k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C  [libcrypto.so.1.1.1g+0x1fde9d]  X509_STORE_add_lookup+0x2d
      
      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j  org.wildfly.openssl.SSLImpl.setSSLVerify0(JII)V+0
      j  org.wildfly.openssl.SSLImpl.setSSLVerify(JII)V+4
      j  org.wildfly.openssl.OpenSSLEngine.lambda$setClientAuth$2(Lorg/wildfly/openssl/OpenSSLEngine$ClientAuthMode;)V+86
      j  org.wildfly.openssl.OpenSSLEngine$$Lambda$1139.run()V+8
      j  org.wildfly.openssl.OpenSSLEngine.initSsl()V+118
      j  org.wildfly.openssl.OpenSSLEngine.unwrap(Ljava/nio/ByteBuffer;[Ljava/nio/ByteBuffer;II)Ljavax/net/ssl/SSLEngineResult;+167
      j  javax.net.ssl.SSLEngine.unwrap(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult;+12 java.base@11.0.12
      j  io.netty.handler.ssl.JdkSslEngine.unwrap(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult;+6
      j  io.netty.handler.ssl.JdkAlpnSslEngine.unwrap(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult;+4
      j  io.netty.handler.ssl.SslHandler$SslEngineType$3.unwrap(Lio/netty/handler/ssl/SslHandler;Lio/netty/buffer/ByteBuf;ILio/netty/buffer/ByteBuf;)Ljavax/net/ssl/SSLEngineResult;+43
      j  io.netty.handler.ssl.SslHandler.unwrap(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;I)I+29
      j  io.netty.handler.ssl.SslHandler.decodeJdkCompatible(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;)V+135
      j  io.netty.handler.ssl.SslHandler.decode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V+21
      j  io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V+9
      

      So far I have only seen the crash once in CI and once on my machine, but if you have any suggestion on how to debug it I can give it a try.

        1. AuthenticationCertIT-hs_err_pid119.log
          100 kB
          Dan Berindei
        2. LalaTest.java
          1 kB
          Ricardo Martin Camarero

              rhn-support-rmartinc Ricardo Martin Camarero
              dberinde@redhat.com Dan Berindei (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: