Bug #57089 SET_ERROR without CHECK_HANDLE in 'ndb_mgm_stop/restart'
Submitted: 29 Sep 2010 8:26 Modified: 29 Sep 2010 12:22
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.0.19 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[29 Sep 2010 8:26] Magnus Blåudd
Description:
The MGMAPI functions ndb_mgm_stop and ndb_mgm_restart set the error code and message without first checking the handle for NULL, this may cause segfault in the MGMAPI.

How to repeat:
MCI

Suggested fix:
Remove the calls to SET_ERROR, that is done properly in ndb_mgm_stop and ndb_mgm_restart calls.
[29 Sep 2010 8:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/119351
[29 Sep 2010 9:02] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.47-ndb-7.0.19 (revid:magnus.blaudd@sun.com-20100929085447-dz94ehufsz381j09) (version source revid:magnus.blaudd@sun.com-20100929085447-dz94ehufsz381j09) (merge vers: 5.1.47-ndb-7.0.19) (pib:21)
[29 Sep 2010 9:06] Magnus Blåudd
and 7.1.8
[29 Sep 2010 12:22] Jon Stephens
Documented bugfix in the NDB-7.0.19 and 7.1.8 changelogs, as follows:

        The MGM API functions ndb_mgm_stop() and ndb_mgm_restart() set
        the error code and message without first checking the handle for
        NULL, which could lead to fatal errors in MGM API application
        depending on these functions.

Closed.