Menu

#111 Segmentation Fault in providerDrv.c

backlog
open
nobody
None
None
Function
2015-03-10
2015-03-10
No

Hello,

Some time ago we've seen segfaults of sfcb because of null pointer dereference in providerDrv.c, line 2418:

2414     if (qs->allProps) {
2415       CMPIConstClass *cc =
2416           getConstClass(CMGetNameSpace(qs->cop, NULL)->hdl,
2417                         CMGetClassName(qs->cop, NULL)->hdl);
2418       kar = cc->ft->getKeyList(cc);
2419     } else {
2420       kar =
2421           getKeyListAndVerifyPropertyList(qs->cop, qs->spNames, &ok, NULL);
2422     }

getConstClass call on line 2416 can return NULL as indication of error, but the return value is not checked afterwards -> possible SIGSEGV.

I'm not able to reproduce it anymore (as the bogus provider causing it was fixed meanwhile), but still I think it would be good to improve the code also in sfcb (check the value, exit the function gracefully, ...).

Discussion


Log in to post a comment.

MongoDB Logo MongoDB