Menu

#59 option -y and 00 in key string bug

version-1.8.18
closed-fixed
None
5
2016-07-31
2010-10-07
Jerome HUET
No

if there is a '00' in the kg key string with option -y (kgkey passed in hexadecimal format)
the key is truncated where there is the 00
0 is the end of string char (\0)

This bug may be in src/plugins/ipmi_intf.c
function 'ipmi_intf_session_set_kgkey'
memcpy(intf->session->v2_data.kg, kgkey,
__min(strlen(kgkey), IPMI_KG_BUFFER_SIZE));

The 'strlen' here is the cause.

Discussion

  • Zdenek Styblik

    Zdenek Styblik - 2013-07-09

    I don't think so. Have you tested it out of ipmitool? I mean, strlen() and given kgkey? Because I'm getting correct strlen() for "12344500afaf".

     
  • Zdenek Styblik

    Zdenek Styblik - 2013-07-19

    There is a bug, indeed. But not in strlen() as author suggested, but in ipmi_parse_hex(). Description and analysis is wrong.

    It seems if '00' is at even position, say 'AA00'(note: just for clarity, 'A00A' would be odd), it will turn-out as '\0'. But it seems it depends on which characters happen to be around '00' as well.

     
  • Zdenek Styblik

    Zdenek Styblik - 2016-07-31
    • status: open --> closed-fixed
    • assigned_to: Zdenek Styblik
    • Group: --> version-1.8.18
     
  • Zdenek Styblik

    Zdenek Styblik - 2016-07-31

    I believe this has been fixed by patches in https://sourceforge.net/p/ipmitool/bugs/375/.

     

Log in to post a comment.

MongoDB Logo MongoDB