Bug 1961687

Summary: spkac segfault reading from stdin
Product: Red Hat Enterprise Linux 9 Reporter: Rob Crittenden <rcritten>
Component: opensslAssignee: Sahana Prasad <sahana>
Status: CLOSED CURRENTRELEASE QA Contact: Alicja Kario <hkario>
Severity: medium Docs Contact:
Priority: medium    
Version: CentOS StreamCC: bstinson, fweimer, hkario, jwboyer
Target Milestone: betaKeywords: Triaged
Target Release: 9.0 Beta   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-07 21:24:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1952930    

Description Rob Crittenden 2021-05-18 13:44:21 UTC
Description of problem:

spkac segfaults while trying to read its configuration file.

(gdb) run spkac -verify -noout < spkac.nss.2048
Program received signal SIGSEGV, Segmentation fault.
0x00005555555e562e in app_load_config_internal (quiet=0, filename=0x0)
    at apps/lib/apps.c:409
409         if (*filename != '\0'
(gdb) where
#0  0x00005555555e562e in app_load_config_internal (quiet=0, filename=0x0)
    at apps/lib/apps.c:409
#1  spkac_main (argc=<optimized out>, argv=<optimized out>) at apps/spkac.c:174
#2  0x00005555555b9fac in do_cmd (prog=<optimized out>, argc=3, 
    argv=0x7fffffffe4d0) at apps/openssl.c:414
#3  0x000055555559b266 in main (argc=3, argv=0x7fffffffe4d0)
    at apps/openssl.c:293

It also fails with: openssl spkac

Version-Release number of selected component (if applicable):
openssl-3.0.0-0.alpha16.1.ssl3.x86_64