Bug 740188 - Missing initialization of a variable in the CHIL engine (openssl)
Summary: Missing initialization of a variable in the CHIL engine (openssl)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openssl
Version: 6.2
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Tomas Mraz
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 743047
TreeView+ depends on / blocked
 
Reported: 2011-09-21 08:58 UTC by Pavel Raiskup
Modified: 2011-12-06 18:08 UTC (History)
1 user (show)

Fixed In Version: openssl-1.0.0-18.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 18:08:51 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1730 normal SHIPPED_LIVE openssl bug fix and enhancement update 2011-12-06 01:02:06 UTC

Description Pavel Raiskup 2011-09-21 08:58:44 UTC
=> engines/e_chil.c:1322

Variable 'answer' may be uninitialized when (eg):

a) prompt_info == NULL (program does not jump to branch on line 1309

and this variable 'answer' is used on line 1322 when:

b) variable 'ok' is greater or equal to 0

Possible solution could be to initialize 'answer' to default value at the beginning of 'if (ui) {}' branch.

This problem was newly found in RHEL 6.2 by coverity difference scan on RHEL packages 6.1 → 6.2.

Comment 2 Tomas Mraz 2011-09-21 10:45:25 UTC
Actually the problem was always there but Coverity was not able to detect it before the patching.

Mirek, is respin still possible due to new deffects found? Note, that we might also need to respin due to the new SSL/TLS attack issue.

Comment 3 Miroslav Vadkerti 2011-09-21 12:32:36 UTC
It is possible if we get exception on the bug. If we will respin becasue of SSL/TLS we should definitely pull this in I think. I'm willing to test it, as a reproducer we could use the coverity scan I assume.

Comment 4 Tomas Mraz 2011-09-21 13:59:11 UTC
Do we actually need an exception?

Comment 10 Tomas Mraz 2011-10-04 09:47:25 UTC
The 1) is just false positive caused by the Coverity static analysis. If you study the code of the fips_set_prng_seed() you'll see that.

The 2) is unimportant as it really does not matter what we return in case EVP_DigestInitEx fails. The function does not have any real error return value and moreover the EVP_DigestInitEx can in this case fail only in case of out of memory error or generic crypto engine misconfiguration error.

The rest are cosmetic unimportant problems.

Comment 11 Pavel Raiskup 2011-10-04 10:39:27 UTC
(In reply to comment #10)
> The 1) is just false positive caused by the Coverity static analysis. If you
> study the code of the fips_set_prng_seed() you'll see that.
> 
> The 2) is unimportant as it really does not matter what we return in case
> EVP_DigestInitEx fails. The function does not have any real error return value
> and moreover the EVP_DigestInitEx can in this case fail only in case of out of
> memory error or generic crypto engine misconfiguration error.

Hi Tomas, thank you that you looked at it.. And I'm sorry for doing the mess here.

Anyway, repair of problem from comment 1 is verified by new Coverity run.

Comment 13 errata-xmlrpc 2011-12-06 18:08:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1730.html


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