Bug 1615098 - SSL_CTX_new(TLSv1_method()) leaves error code 337146240 on stack
Summary: SSL_CTX_new(TLSv1_method()) leaves error code 337146240 on stack
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openssl
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1614884 1615099 1615143
TreeView+ depends on / blocked
 
Reported: 2018-08-12 10:26 UTC by Christian Heimes
Modified: 2020-05-19 10:04 UTC (History)
3 users (show)

Fixed In Version: openssl-1.1.1-0.pre8.3.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1615099 (view as bug list)
Environment:
Last Closed: 2018-08-13 10:14:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
reproducer (725 bytes, text/x-csrc)
2018-08-12 10:26 UTC, Christian Heimes
no flags Details

Description Christian Heimes 2018-08-12 10:26:08 UTC
Created attachment 1475331 [details]
reproducer

Description of problem:
On Fedora 29, SSL_CTX_new(TLSv1_method()) succeeds but leaves error code 337146240 (ERR_LIB_SSL, SSL_F_SSL_DO_CONFIG, SSL_R_BAD_VALUE) on the error stack.

Version-Release number of selected component (if applicable):
openssl-1.1.1-0.pre8.2.fc29.x86_64

How reproducible:
always

Steps to Reproduce:
1. gcc -lssl -lcrypto -o ctxerr ctxerr.c
2. ./ctxerr

Actual results:
err: 337146240, lib: 20, func: 391, reason: 384, msg: 'bad value'

Expected results:
OK

Comment 1 Christian Heimes 2018-08-12 13:21:59 UTC
The error code is set in ssl_do_config(). For TLSv1_method, SSL_CONF_cmd(cctx, cmdstr, arg) with cmdstr "MinProtocol" and value "TLSv1" results in SSL_R_BAD_VALUE.

call stack:

#0  ssl_do_config (s=s@entry=0x0, ctx=ctx@entry=0x42bc20, name=<optimized out>, name@entry=0x0, 
    system=system@entry=1) at ssl/ssl_mcnf.c:74
#1  0x00007ffff7f71545 in ssl_ctx_system_config (ctx=ctx@entry=0x42bc20) at ssl/ssl_mcnf.c:98
#2  0x00007ffff7f6cb57 in SSL_CTX_new (meth=0x7ffff7fbdda0 <tlsv1_method_data>) at ssl/ssl_lib.c:3059
#3  0x000000000040124d in main ()


Note You need to log in before you can comment on or make changes to this bug.