Menu

#744 Solaris Segfault in 5.4 when walking oder hrDisk

closed
None
5
2012-11-08
2007-02-23
No

There is an off-by-one bug in hr_disk.c

HRD_history is allocated HRDEV_TYPE_MASK (255) number of entries and also correctly cleared this number of entries. But access to this structure goes up to index 255, which leads to accedd the element after HRD_history[]. Here, disk_devices[] follows, which is a struct with a pointer to disk_devpart_string as the first element. So this pointer of the first entry of this array is garbled, which leads to a segfault in Get_Next_HR_Disk_Partition() when doing the right GETNEXT.

The attached patch correctly allocates and initializes the array, the segfaults of the agent (at least the ones at this location) are gone with this patch.

Discussion

  • Michael Kukat

    Michael Kukat - 2007-02-23
     
  • Michael Kukat

    Michael Kukat - 2007-02-23

    Logged In: YES
    user_id=794829
    Originator: YES

    Maybe it's a dup, i don't have the time to check this thread further, and hunting for the segfault problem initially, i didn't find anything here, so i submitted this patch.

    If it's the same, you may just want to ignore/delete/whatever my post.

    Sorry, that i don't have the time to scan _ALL_ patches/bugs posted here, i just can search for them, and i did this. Nobody said that my patch is different or better than any existing stuff, i just wanted to help in case there is no patch known by now (which seemed to me, as i didn't find the other patch).

     
  • Nobody/Anonymous

    Logged In: NO

    See also patch 1617255, seems to be the same issue.

     
  • Wes Hardaker

    Wes Hardaker - 2007-05-17

    Logged In: YES
    user_id=76242
    Originator: NO

    ended up applying the other one. Thanks very much for your contribution though!

     

Log in to post a comment.