Bug 758102 - Possible NULL dereferences (mysql-connector-odbc64)
Summary: Possible NULL dereferences (mysql-connector-odbc64)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mysql-connector-odbc64
Version: 5.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tom Lane
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-29 11:08 UTC by Pavel Raiskup
Modified: 2013-03-06 04:02 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-06 04:02:57 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Pavel Raiskup 2011-11-29 11:08:59 UTC
I have looked at first scan of mysql-connector-odbc64, here are my points:

1) Dereference of NULL pointer

   => util/odbcinstw.c:89

   It looks that there is mistake on line 73. Malloc returns NULL (when error
   occurred) by default. No need to use if-else. Should there be return 0; in
   else branch instead?

2) Dereference of NULL pointer

   => driver/info.c:773

   Dereference of the dbc->ds. Based on the check on line 768 it looks that
   this pointer may be NULL.

3) Again (two) dereferences of NULL pointers

   => driver/utility.c:545|760

   The pointer 'result' may be set to zero on line 475 (and on line 516) and
   is dereferenced even when is equal to zero on line 545.

4) Copy and paste error?

   => util/MYODBCUtilWriteDataSourceStr.c:73

   Passing possible NULL pointer -- pDataSource->pszDATABASE -- into
   MYODBCUtilInsertStr(). Shouldn't there be the pDataSource->pszDESCRIPTION
   pointer?

   (This defect is mentioned in Bug 756947 also.)

These problems were found in RHEL 5.8 by the Coverity tool (firstly), because
mysql-connector-odbc64 is a new package in RHEL-5. I've tried to keep only most
seriously looking defects.

Comment 3 RHEL Program Management 2012-01-09 14:49:03 UTC
This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.8 and Red Hat does not plan to fix this issue the currently developed update.

Contact your manager or support representative in case you need to escalate this bug.

Comment 5 RHEL Program Management 2012-06-12 01:30:30 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 6 Tom Lane 2013-03-06 04:02:57 UTC
Filed upstream by Honza, but I don't think we'll do anything about this in RHEL5.


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