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.
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".
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.
I believe this has been fixed by patches in https://sourceforge.net/p/ipmitool/bugs/375/.