openhpi2 / Open-HPI-base

Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers
0 stars 1 forks source link

remove_interconnect() in oa_soap_plugins code bug #2492

Closed openhpi2 closed 8 years ago

openhpi2 commented 11 years ago

In plugins/oa_soap/oa_soap_re_discover.c we have the following bug in remove_interconnect(): if (hotswap_state == NULL) { err("Failed to get hotswap state"); event.event.EventDataUnion.HotSwapEvent.PreviousHotSwapState = SAHPI_HS_STATE_INACTIVE; }
else
event.event.EventDataUnion.HotSwapEvent.PreviousHotSwapState = hotswap_state->currentHsState;

event.event.EventDataUnion.HotSwapEvent.HotSwapState = SAHPI_HS_STATE_NOT_PRESENT;

if (hotswap_state->currentHsState == SAHPI_HS_STATE_INACTIVE) { <--- If hotswap_state was NULL above we segfault here /* INACTIVE to NOT_PRESENT state change happened due to

Reported by: mbaldessari

openhpi2 commented 11 years ago

Good find. Thank you. We will fix this soon. We never hit this issue. Is there a tool that you have used to uncover this problem? If so let's know what is that tool.

Original comment by: dr_mohan

openhpi2 commented 11 years ago

Fixed in #7531

Original comment by: dr_mohan

openhpi2 commented 11 years ago

Original comment by: dr_mohan

openhpi2 commented 11 years ago

Original comment by: dr_mohan

openhpi2 commented 11 years ago

*_ATTENTION_** This account is disabled and is no longer accessed by the recipient. Please remove it from your address book.

Thanks

Original comment by: tariqx