Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-40571

on s390x and FIPS mode print error msg that this arch is not supported and exit

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-8.2.0.z
    • golang
    • None
    • sst_pt_llvm_rust_go
    • ssg_platform_tools
    • 2
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • s390x
    • None

      on installation of the latest go-toolset on this platform and running crypto/x509 test, we get a panic runtime error, instead we should print an error message saying that this arch is not supported with this Golang version in FIPS mode and exit without a panic. For this we need to add a check in the init() section of the crypto library to exit if the system is in FIPS mode and the architecture is s390x

      [root@s390x-kvm-100 yum.repos.d]# yum install go-toolset
      Updating Subscription Management repositories.
      Unable to read consumer identity
      This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
      ODCS repository for compose odcs-3170134                                                                789 kB/s |  57 kB     00:00    
      Dependencies resolved.
      ========================================================================================================================================
       Package                        Architecture      Version                                             Repository                   Size
      ========================================================================================================================================
      Installing:
       go-toolset                     s390x             1.13.15-1.module+el8.2.0+7662+fa98b974              beaker-AppStream             11 k
      Installing dependencies:
       binutils                       s390x             2.30-73.el8_2.1                                     beaker-BaseOS               5.9 M
       cpp                            s390x             8.3.1-7.el8_2                                       beaker-AppStream            8.2 M
       gcc                            s390x             8.3.1-7.el8_2                                       beaker-AppStream             18 M
       glibc-devel                    s390x             2.28-101.el8_2.2                                    beaker-BaseOS               1.0 M
       glibc-headers                  s390x             2.28-101.el8_2.2                                    beaker-BaseOS               465 k
       golang                         s390x             1.13.15-9.module+el8.2.0+21783+c1a72448             beaker-AppStream            700 k
       golang-bin                     s390x             1.13.15-9.module+el8.2.0+21783+c1a72448             beaker-AppStream             86 M
       golang-src                     noarch            1.13.15-9.module+el8.2.0+21783+c1a72448             beaker-AppStream            7.2 M
       isl                            s390x             0.16.1-6.el8                                        beaker-AppStream            801 k
       kernel-headers                 s390x             4.18.0-193.135.1.el8_2                              beaker-BaseOS               4.0 M
       keyutils-libs-devel            s390x             1.5.10-6.el8                                        beaker-BaseOS                48 k
       krb5-devel                     s390x             1.17-19.el8_2                                       beaker-BaseOS               547 k
       libasan                        s390x             8.3.1-7.el8_2                                       beaker-BaseOS               371 k
       libatomic                      s390x             8.3.1-7.el8_2                                       beaker-BaseOS                21 k
       libcom_err-devel               s390x             1.45.4-3.el8                                        beaker-BaseOS                38 k
       libgomp                        s390x             8.3.1-7.el8_2                                       beaker-BaseOS               198 k
       libkadm5                       s390x             1.17-19.el8_2                                       beaker-BaseOS               180 k
       libmpc                         s390x             1.0.2-9.el8                                         beaker-AppStream             56 k
       libselinux-devel               s390x             2.9-3.el8                                           beaker-BaseOS               199 k
       libsepol-devel                 s390x             2.9-1.el8                                           beaker-BaseOS                86 k
       libubsan                       s390x             8.3.1-7.el8_2                                       beaker-BaseOS               144 k
       libverto-devel                 s390x             0.3.0-5.el8                                         beaker-BaseOS                18 k
       libxcrypt-devel                s390x             4.1.1-4.el8                                         beaker-BaseOS                25 k
       openssl-devel                  s390x             1:1.1.1c-21.el8_2                                   beaker-BaseOS               2.3 M
       pcre2-devel                    s390x             10.32-1.el8                                         beaker-BaseOS               605 k
       pcre2-utf16                    s390x             10.32-1.el8                                         beaker-BaseOS               151 k
       pcre2-utf32                    s390x             10.32-1.el8                                         beaker-BaseOS               145 k
       zlib-devel                     s390x             1.2.11-17.el8_2                                     beaker-BaseOS                58 k
      Enabling module streams:
       go-toolset                                       rhel8                                                                                Transaction Summary
      ========================================================================================================================================
      Install  29 PackagesTotal download size: 138 M
      Installed size: 431 M
      Is this ok [y/N]: y
      Downloading Packages:
      (1/29): go-toolset-1.13.15-1.module+el8.2.0+7662+fa98b974.s390x.rpm                                     1.0 MB/s |  11 kB     00:00    
      (2/29): golang-1.13.15-9.module+el8.2.0+21783+c1a72448.s390x.rpm                                         35 MB/s | 700 kB     00:00    
      (3/29): cpp-8.3.1-7.el8_2.s390x.rpm                                                                      60 MB/s | 8.2 MB     00:00    
      (4/29): golang-src-1.13.15-9.module+el8.2.0+21783+c1a72448.noarch.rpm                                    65 MB/s | 7.2 MB     00:00    
      (5/29): gcc-8.3.1-7.el8_2.s390x.rpm                                                                      67 MB/s |  18 MB     00:00    
      (6/29): isl-0.16.1-6.el8.s390x.rpm                                                                       26 MB/s | 801 kB     00:00    
      (7/29): libmpc-1.0.2-9.el8.s390x.rpm                                                                    6.9 MB/s |  56 kB     00:00    
      (8/29): glibc-devel-2.28-101.el8_2.2.s390x.rpm                                                           30 MB/s | 1.0 MB     00:00    
      (9/29): glibc-headers-2.28-101.el8_2.2.s390x.rpm                                                         32 MB/s | 465 kB     00:00    
      (10/29): binutils-2.30-73.el8_2.1.s390x.rpm                                                              53 MB/s | 5.9 MB     00:00    
      (11/29): kernel-headers-4.18.0-193.135.1.el8_2.s390x.rpm                                                 69 MB/s | 4.0 MB     00:00    
      (12/29): keyutils-libs-devel-1.5.10-6.el8.s390x.rpm                                                     6.6 MB/s |  48 kB     00:00    
      (13/29): libasan-8.3.1-7.el8_2.s390x.rpm                                                                 34 MB/s | 371 kB     00:00    
      (14/29): krb5-devel-1.17-19.el8_2.s390x.rpm                                                              35 MB/s | 547 kB     00:00    
      (15/29): libatomic-8.3.1-7.el8_2.s390x.rpm                                                              4.2 MB/s |  21 kB     00:00    
      (16/29): libcom_err-devel-1.45.4-3.el8.s390x.rpm                                                        7.0 MB/s |  38 kB     00:00    
      (17/29): libgomp-8.3.1-7.el8_2.s390x.rpm                                                                 26 MB/s | 198 kB     00:00    
      (18/29): libkadm5-1.17-19.el8_2.s390x.rpm                                                                21 MB/s | 180 kB     00:00    
      (19/29): libsepol-devel-2.9-1.el8.s390x.rpm                                                              12 MB/s |  86 kB     00:00    
      (20/29): libselinux-devel-2.9-3.el8.s390x.rpm                                                            18 MB/s | 199 kB     00:00    
      (21/29): libverto-devel-0.3.0-5.el8.s390x.rpm                                                           4.1 MB/s |  18 kB     00:00    
      (22/29): libubsan-8.3.1-7.el8_2.s390x.rpm                                                                21 MB/s | 144 kB     00:00    
      (23/29): libxcrypt-devel-4.1.1-4.el8.s390x.rpm                                                          4.4 MB/s |  25 kB     00:00    
      (24/29): pcre2-devel-10.32-1.el8.s390x.rpm                                                               32 MB/s | 605 kB     00:00    
      (25/29): openssl-devel-1.1.1c-21.el8_2.s390x.rpm                                                         67 MB/s | 2.3 MB     00:00    
      (26/29): pcre2-utf16-10.32-1.el8.s390x.rpm                                                               13 MB/s | 151 kB     00:00    
      (27/29): zlib-devel-1.2.11-17.el8_2.s390x.rpm                                                           4.3 MB/s |  58 kB     00:00    
      (28/29): pcre2-utf32-10.32-1.el8.s390x.rpm                                                               10 MB/s | 145 kB     00:00    
      (29/29): golang-bin-1.13.15-9.module+el8.2.0+21783+c1a72448.s390x.rpm                                    99 MB/s |  86 MB     00:00    
      ----------------------------------------------------------------------------------------------------------------------------------------
      Total                                                                                                   153 MB/s | 138 MB     00:00     
      Running transaction check
      Transaction check succeeded.
      Running transaction test
      Transaction test succeeded.
      Running transaction
        Running scriptlet: golang-1.13.15-9.module+el8.2.0+21783+c1a72448.s390x                                                           1/1 
        Preparing        :                                                                                                                1/1 
        Installing       : libmpc-1.0.2-9.el8.s390x                                                                                      1/29 
        Running scriptlet: libmpc-1.0.2-9.el8.s390x                                                                                      1/29 
        Installing       : cpp-8.3.1-7.el8_2.s390x                                                                                       2/29 
        Running scriptlet: cpp-8.3.1-7.el8_2.s390x                                                                                       2/29 
        Installing       : zlib-devel-1.2.11-17.el8_2.s390x                                                                              3/29 
        Installing       : pcre2-utf32-10.32-1.el8.s390x                                                                                 4/29 
        Installing       : pcre2-utf16-10.32-1.el8.s390x                                                                                 5/29 
        Installing       : pcre2-devel-10.32-1.el8.s390x                                                                                 6/29 
        Installing       : libverto-devel-0.3.0-5.el8.s390x                                                                              7/29 
        Installing       : libubsan-8.3.1-7.el8_2.s390x                                                                                  8/29 
        Running scriptlet: libubsan-8.3.1-7.el8_2.s390x                                                                                  8/29 
        Installing       : libsepol-devel-2.9-1.el8.s390x                                                                                9/29 
        Installing       : libselinux-devel-2.9-3.el8.s390x                                                                             10/29 
        Installing       : libkadm5-1.17-19.el8_2.s390x                                                                                 11/29 
        Installing       : libgomp-8.3.1-7.el8_2.s390x                                                                                  12/29 
        Running scriptlet: libgomp-8.3.1-7.el8_2.s390x                                                                                  12/29 
        Installing       : libcom_err-devel-1.45.4-3.el8.s390x                                                                          13/29 
        Installing       : libatomic-8.3.1-7.el8_2.s390x                                                                                14/29 
        Running scriptlet: libatomic-8.3.1-7.el8_2.s390x                                                                                14/29 
        Installing       : libasan-8.3.1-7.el8_2.s390x                                                                                  15/29 
        Running scriptlet: libasan-8.3.1-7.el8_2.s390x                                                                                  15/29 
        Installing       : keyutils-libs-devel-1.5.10-6.el8.s390x                                                                       16/29 
        Installing       : krb5-devel-1.17-19.el8_2.s390x                                                                               17/29 
        Installing       : openssl-devel-1:1.1.1c-21.el8_2.s390x                                                                        18/29 
        Installing       : kernel-headers-4.18.0-193.135.1.el8_2.s390x                                                                  19/29 
        Running scriptlet: glibc-headers-2.28-101.el8_2.2.s390x                                                                         20/29 
        Installing       : glibc-headers-2.28-101.el8_2.2.s390x                                                                         20/29 
        Installing       : libxcrypt-devel-4.1.1-4.el8.s390x                                                                            21/29 
        Installing       : glibc-devel-2.28-101.el8_2.2.s390x                                                                           22/29 
        Running scriptlet: glibc-devel-2.28-101.el8_2.2.s390x                                                                           22/29 
        Installing       : binutils-2.30-73.el8_2.1.s390x                                                                               23/29 
        Running scriptlet: binutils-2.30-73.el8_2.1.s390x                                                                               23/29 
        Installing       : isl-0.16.1-6.el8.s390x                                                                                       24/29 
        Running scriptlet: isl-0.16.1-6.el8.s390x                                                                                       24/29 
        Installing       : gcc-8.3.1-7.el8_2.s390x                                                                                      25/29 
        Running scriptlet: gcc-8.3.1-7.el8_2.s390x                                                                                      25/29 
        Installing       : golang-src-1.13.15-9.module+el8.2.0+21783+c1a72448.noarch                                                    26/29 
        Installing       : golang-1.13.15-9.module+el8.2.0+21783+c1a72448.s390x                                                         27/29 
        Installing       : golang-bin-1.13.15-9.module+el8.2.0+21783+c1a72448.s390x                                                     28/29 
        Installing       : go-toolset-1.13.15-1.module+el8.2.0+7662+fa98b974.s390x                                                      29/29 
        Running scriptlet: go-toolset-1.13.15-1.module+el8.2.0+7662+fa98b974.s390x                                                      29/29 
        Verifying        : cpp-8.3.1-7.el8_2.s390x                                                                                       1/29 
        Verifying        : gcc-8.3.1-7.el8_2.s390x                                                                                       2/29 
        Verifying        : go-toolset-1.13.15-1.module+el8.2.0+7662+fa98b974.s390x                                                       3/29 
        Verifying        : golang-1.13.15-9.module+el8.2.0+21783+c1a72448.s390x                                                          4/29 
        Verifying        : golang-bin-1.13.15-9.module+el8.2.0+21783+c1a72448.s390x                                                      5/29 
        Verifying        : golang-src-1.13.15-9.module+el8.2.0+21783+c1a72448.noarch                                                     6/29 
        Verifying        : isl-0.16.1-6.el8.s390x                                                                                        7/29 
        Verifying        : libmpc-1.0.2-9.el8.s390x                                                                                      8/29 
        Verifying        : binutils-2.30-73.el8_2.1.s390x                                                                                9/29 
        Verifying        : glibc-devel-2.28-101.el8_2.2.s390x                                                                           10/29 
        Verifying        : glibc-headers-2.28-101.el8_2.2.s390x                                                                         11/29 
        Verifying        : kernel-headers-4.18.0-193.135.1.el8_2.s390x                                                                  12/29 
        Verifying        : keyutils-libs-devel-1.5.10-6.el8.s390x                                                                       13/29 
        Verifying        : krb5-devel-1.17-19.el8_2.s390x                                                                               14/29 
        Verifying        : libasan-8.3.1-7.el8_2.s390x                                                                                  15/29 
        Verifying        : libatomic-8.3.1-7.el8_2.s390x                                                                                16/29 
        Verifying        : libcom_err-devel-1.45.4-3.el8.s390x                                                                          17/29 
        Verifying        : libgomp-8.3.1-7.el8_2.s390x                                                                                  18/29 
        Verifying        : libkadm5-1.17-19.el8_2.s390x                                                                                 19/29 
        Verifying        : libselinux-devel-2.9-3.el8.s390x                                                                             20/29 
        Verifying        : libsepol-devel-2.9-1.el8.s390x                                                                               21/29 
        Verifying        : libubsan-8.3.1-7.el8_2.s390x                                                                                 22/29 
        Verifying        : libverto-devel-0.3.0-5.el8.s390x                                                                             23/29 
        Verifying        : libxcrypt-devel-4.1.1-4.el8.s390x                                                                            24/29 
        Verifying        : openssl-devel-1:1.1.1c-21.el8_2.s390x                                                                        25/29 
        Verifying        : pcre2-devel-10.32-1.el8.s390x                                                                                26/29 
        Verifying        : pcre2-utf16-10.32-1.el8.s390x                                                                                27/29 
        Verifying        : pcre2-utf32-10.32-1.el8.s390x                                                                                28/29 
        Verifying        : zlib-devel-1.2.11-17.el8_2.s390x                                                                             29/29 
      Installed products updated.Installed:
        binutils-2.30-73.el8_2.1.s390x                                      cpp-8.3.1-7.el8_2.s390x                                           
        gcc-8.3.1-7.el8_2.s390x                                             glibc-devel-2.28-101.el8_2.2.s390x                                
        glibc-headers-2.28-101.el8_2.2.s390x                                go-toolset-1.13.15-1.module+el8.2.0+7662+fa98b974.s390x           
        golang-1.13.15-9.module+el8.2.0+21783+c1a72448.s390x                golang-bin-1.13.15-9.module+el8.2.0+21783+c1a72448.s390x          
        golang-src-1.13.15-9.module+el8.2.0+21783+c1a72448.noarch           isl-0.16.1-6.el8.s390x                                            
        kernel-headers-4.18.0-193.135.1.el8_2.s390x                         keyutils-libs-devel-1.5.10-6.el8.s390x                            
        krb5-devel-1.17-19.el8_2.s390x                                      libasan-8.3.1-7.el8_2.s390x                                       
        libatomic-8.3.1-7.el8_2.s390x                                       libcom_err-devel-1.45.4-3.el8.s390x                               
        libgomp-8.3.1-7.el8_2.s390x                                         libkadm5-1.17-19.el8_2.s390x                                      
        libmpc-1.0.2-9.el8.s390x                                            libselinux-devel-2.9-3.el8.s390x                                  
        libsepol-devel-2.9-1.el8.s390x                                      libubsan-8.3.1-7.el8_2.s390x                                      
        libverto-devel-0.3.0-5.el8.s390x                                    libxcrypt-devel-4.1.1-4.el8.s390x                                 
        openssl-devel-1:1.1.1c-21.el8_2.s390x                               pcre2-devel-10.32-1.el8.s390x                                     
        pcre2-utf16-10.32-1.el8.s390x                                       pcre2-utf32-10.32-1.el8.s390x                                     
        zlib-devel-1.2.11-17.el8_2.s390x                                   Complete!
      [root@s390x-kvm-100 yum.repos.d]# yum install golang-tests
      Updating Subscription Management repositories.
      Unable to read consumer identity
      This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
      Last metadata expiration check: 0:00:41 ago on Mon 10 Jun 2024 05:50:39 AM EDT.
      Dependencies resolved.
      ========================================================================================================================================
       Package                   Architecture        Version                                              Repository                     Size
      ========================================================================================================================================
      Installing:
       golang-tests              noarch              1.13.15-9.module+el8.2.0+21783+c1a72448              beaker-AppStream              6.4 MTransaction Summary
      ========================================================================================================================================
      Install  1 PackageTotal download size: 6.4 M
      Installed size: 25 M
      Is this ok [y/N]: y
      Downloading Packages:
      golang-tests-1.13.15-9.module+el8.2.0+21783+c1a72448.noarch.rpm                                          92 MB/s | 6.4 MB     00:00    
      ----------------------------------------------------------------------------------------------------------------------------------------
      Total                                                                                                    91 MB/s | 6.4 MB     00:00     
      Running transaction check
      Transaction check succeeded.
      Running transaction test
      Transaction test succeeded.
      Running transaction
        Preparing        :                                                                                                                1/1 
        Installing       : golang-tests-1.13.15-9.module+el8.2.0+21783+c1a72448.noarch                                                    1/1 
        Running scriptlet: golang-tests-1.13.15-9.module+el8.2.0+21783+c1a72448.noarch                                                    1/1 
        Verifying        : golang-tests-1.13.15-9.module+el8.2.0+21783+c1a72448.noarch                                                    1/1 
      Installed products updated.Installed:
        golang-tests-1.13.15-9.module+el8.2.0+21783+c1a72448.noarch                                                                           Complete!
      [root@s390x-kvm-100 yum.repos.d]# cd
      
      [root@s390x-kvm-100 ~]# GOLANG_FIPS=1 go test -v -timeout 50m -count=1 crypto/x509
      === RUN   TestConstraintCases
      — FAIL: TestConstraintCases (0.02s)
      panic: runtime error: slice bounds out of range [:304942678016] with capacity 72 [recovered]
      panic: runtime error: slice bounds out of range [:304942678016] with capacity 72
       
      goroutine 7 [running]:
      testing.tRunner.func1(0xc0000d0100)
      /usr/lib/golang/src/testing/testing.go:874 +0x41a
      panic(0x25bf80, 0xc00001e500)
      /usr/lib/golang/src/runtime/panic.go:679 +0x1d4
      crypto/internal/boring.SignMarshalECDSA(0xc000010038, 0xc00001e480, 0x20, 0x20, 0x0, 0xc000010038, 0xc000064800, 0x0, 0xc0000647b0, 0x2e52a0)
      /usr/lib/golang/src/crypto/internal/boring/ecdsa.go:166 +0x220
      crypto/internal/boring.SignECDSA(0xc000010038, 0xc00001e480, 0x20, 0x20, 0x0, 0x24224, 0x0, 0x55b4a, 0x5579c)
      /usr/lib/golang/src/crypto/internal/boring/ecdsa.go:136 +0x4e
      crypto/ecdsa.Sign(0x2e0340, 0x2da610, 0xc000064780, 0xc00001e480, 0x20, 0x20, 0x0, 0x1ce1e8, 0x10, 0x2261e0)
      /usr/lib/golang/src/crypto/ecdsa/ecdsa.go:182 +0x10e
      crypto/ecdsa.(*PrivateKey).Sign(0xc000064780, 0x2e0340, 0x2da610, 0xc00001e480, 0x20, 0x20, 0x2e02a0, 0xc000016850, 0x0, 0x0, ...)
      /usr/lib/golang/src/crypto/ecdsa/ecdsa.go:85 +0x4e
      crypto/x509.CreateCertificate(0x2e0340, 0x2da610, 0xc0001135a0, 0xc0001135a0, 0x24c340, 0xc000064780, 0x257360, 0xc000064780, 0x0, 0xc00004d5a0, ...)
      /usr/lib/golang/src/crypto/x509/x509.go:2210 +0x594
      crypto/x509.makeConstraintsCACert(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000016538, ...)
      /usr/lib/golang/src/crypto/x509/name_constraints_test.go:1644 +0x1f8
      crypto/x509.TestConstraintCases(0xc0000d0100)
      /usr/lib/golang/src/crypto/x509/name_constraints_test.go:1902 +0x114
      testing.tRunner(0xc0000d0100, 0x2a48f8)
      /usr/lib/golang/src/testing/testing.go:909 +0xd6
      created by testing.(*T).Run
      /usr/lib/golang/src/testing/testing.go:960 +0x36c
      FAIL crypto/x509 0.025s
      FAIL
       

            dbenoit@redhat.com David Benoit
            rh-ee-aravinda Archana Ravindar
            David Benoit David Benoit
            Edjunior Machado Edjunior Machado
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: