Project

General

Profile

Bug #12637

ses_facility.c topo methods are not properly terminated

Added by Robert Mustacchi 2 months ago. Updated 16 days ago.

Status:
New
Priority:
Normal
Category:
lib - userland libraries
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

When a series of FMA topo methods are registered, the resulting array must be null terminated. After auditing the source tree, I have found two cases of this right now: ses_indicator_methods and ses_sensor_methods. Tracking down the history here, it appears that this occurred in the initial integration of these changes back in:

commit d91236fe104c7ea63142e053b22a39c8a30d304b
Author: eschrock <none@none>
Date:   Fri Aug 1 18:36:31 2008 -0700

    PSARC 2008/485 SES Sensors and Enumerator
    6720433 SES enumerator should provide controller revision information
    6720435 SES enumerator should prefer description over class-description
    6720452 SES enumerator should support indicators and sensors
    6722807 SES enumerator should work with internal enclosures
    6722809 want a way to identify enclosures as internal
    6722811 SES enumerator should prefer elements with known status
    6723603 x86 xmlgen topo scripts should make use of propmap
    6732875 typo in fan-hc-topology.xmlgen
    6732879 broken logic in pad_process()

I've looked a bit into smatch to try and catch this, but it appears that upstream is working on similar support right now so we'll wait and come back to that later. For the time being, the best we can do is a manual audit to make sure that nothing else makes it through there.

History

#1

Updated by Electric Monk 16 days ago

  • Gerrit CR set to 636

Also available in: Atom PDF