Bug 479767 - Calls to OBJ_txt2nid for a non-registered objects adds bogus "first num too large" errors from a2d_ASN1_OBJECT
Summary: Calls to OBJ_txt2nid for a non-registered objects adds bogus "first num too l...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: openssl
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-12 22:53 UTC by Mattias Ellert
Modified: 2009-06-30 10:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-30 10:49:30 UTC
Type: ---
Embargoed:


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

Description Mattias Ellert 2009-01-12 22:53:19 UTC
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):
0.9.8b-14.fc6
0.9.8b-15.fc7
0.9.8b-17.fc8
0.9.8g-9.12.fc9
0.9.8g-12.fc10
0.9.8b-8.3.el5

How reproducible:
Always

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
a2d_ASN1_OBJECT

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)
0.9.7a-43.17.el4_6.1

It looks like the problems was introduced when transitioning from 0.9.8a to 0.9.8b.

Comment 1 Mattias Ellert 2009-01-12 22:55:08 UTC
Created attachment 328798 [details]
Test program

Comment 2 Tomas Mraz 2009-01-13 07:27:13 UTC
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 .

Comment 3 Mattias Ellert 2009-01-13 17:57:00 UTC
Compiling the test program against the 0.9.8j version compiled from the source tarball shows the same issue.

Reported upstream as requested:

http://rt.openssl.org/Ticket/Display.html?id=1819

Comment 4 Tomas Mraz 2009-01-13 18:11:37 UTC
Great, thanks.

Comment 5 Tomas Mraz 2009-01-14 21:33:50 UTC
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.