Bug 479767 - Calls to OBJ_txt2nid for a non-registered objects adds bogus "first num too large" errors from a2d_ASN1_OBJECT
Calls to OBJ_txt2nid for a non-registered objects adds bogus "first num too l...
Product: Fedora
Classification: Fedora
Component: openssl (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-01-12 17:53 EST by Mattias Ellert
Modified: 2009-06-30 06:49 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-30 06:49:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Test program (699 bytes, text/plain)
2009-01-12 17:55 EST, Mattias Ellert
no flags Details

  None (edit)
Description Mattias Ellert 2009-01-12 17:53:19 EST
Description of problem:
Calls to OBJ_txt2nid for a non-registered objects adds bogus "first num too large" errors from a2d_ASN1_OBJECT.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Compile and run the attached test as follows
2. g++ -o openssltest openssltest.cpp -lssl
3. ./openssltest
Actual results:
OBJ_txt2nid: 17
OBJ_txt2nid: 0
first num too large

Expected results:
OBJ_txt2nid: 17
OBJ_txt2nid: 0

Additional info:
These versions do not have this issue:
0.9.7a-20.6.legacy (RH9)
0.9.7a-33.13.legacy (FC1)
0.9.7a-35.2.legacy (FC2)
0.9.7a-42.2 (FC3)
0.9.7f-7.10 (FC4)
0.9.8a-5.4 (FC5)
0.9.7a-33.23 (RHEL3)

It looks like the problems was introduced when transitioning from 0.9.8a to 0.9.8b.
Comment 1 Mattias Ellert 2009-01-12 17:55:08 EST
Created attachment 328798 [details]
Test program
Comment 2 Tomas Mraz 2009-01-13 02:27:13 EST
Is the bug present in the latest upstream (namely 0.9.8j) ?

If so, could you please report it through the upstream bug tracker by sending e-mail to rt@openssl.org .
Comment 3 Mattias Ellert 2009-01-13 12:57:00 EST
Compiling the test program against the 0.9.8j version compiled from the source tarball shows the same issue.

Reported upstream as requested:

Comment 4 Tomas Mraz 2009-01-13 13:11:37 EST
Great, thanks.
Comment 5 Tomas Mraz 2009-01-14 16:33:50 EST
It was caused by this checkin http://cvs.openssl.org/chngview?cn=14633
Namely there is commented out ERR_clear_error() call now in OBJ_txt2obj().

Thinking more about the problem. The error is not quite bogus, although the error description is not accurate. The OBJ_txt2nid is not supposed to be called on unregistered objects so the zero return value indicates an error. You might as well call ERR_clear_error() in that case.

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