Bug #77349 | Missing Sanity Check for malloc() in mgmapi.cpp | ||
---|---|---|---|
Submitted: | 14 Jun 2015 20:06 | Modified: | 15 Jun 2015 16:54 |
Reporter: | Bill Parker | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S2 (Serious) |
Version: | 5.6.2x | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | sanity checking |
[14 Jun 2015 20:06]
Bill Parker
[14 Jun 2015 20:08]
Bill Parker
Patch File for This Bug Report
Attachment: mgmapi.cpp.patch (text/x-diff), 477 bytes.
[15 Jun 2015 13:25]
MySQL Verification Team
To me, this looks like a bug. Out-Of-Memory error is very hard one and should not occur in practice. However, this is code from Cluster storage engine.
[15 Jun 2015 13:44]
MySQL Verification Team
Hi, Thanks for the report. Yes this is a bug, the value returned by malloc() should be tested. The actual way of reporting error and behavior on error might be handled differently (depends on the cluster dev team decision) but in any case error need to be reported kind regards Bogdan Kecman
[15 Jun 2015 16:54]
Bill Parker
Thanks for the confirmation, I was thinking, would this warrant a entry to Mitre CVE (on the off chance that a NULL pointer, I know probably quite hard to exhaust memory, could be passed to memset(), which would result in a segfault and potential loss of data)?