Menu

#508 Run Node Manager some commands will cause Segmentation fault.

version-1.8.19
closed-fixed
None
5
2018-04-06
2018-03-01
Elaine Li
No

Run below NM commands will cause ipmitool Segmentation fault.
1. nm_alert_opts
2. nm_set_alert_param
3. nm_thresh_cmds
4. nm_suspend_cmds

diff -ruN ipmitool-1.8.18.orig/lib/ipmi_dcmi.c ipmitool-1.8.18.new/lib/ipmi_dcmi.c
--- ipmitool-1.8.18.orig/lib/ipmi_dcmi.c    2018-02-27 19:01:37.949879900 +0800
+++ ipmitool-1.8.18.new/lib/ipmi_dcmi.c 2018-03-01 11:17:22.642570311 +0800
Patch 
@@ -475,17 +476,20 @@
    { 0x01, "set", "nm alert set chan <chan> dest <dest> string <string>" },
    { 0x02, "get", "nm alert get" },
    { 0x03, "clear", "nm alert clear dest <dest>" },
+   { 0xFF, NULL, NULL },
 };

 const struct dcmi_cmd nm_set_alert_param[] = {
    { 0x01, "chan", "chan <channel>" },
    { 0x02, "dest", "dest <destination>" },
    { 0x03, "string", "string <string>" },
+   { 0xFF, NULL, NULL },
 };

 const struct dcmi_cmd nm_thresh_cmds[] = {
    { 0x01, "set", "nm thresh set [domain <platform|CPU|Memory>] policy_id <policy> thresh_array" },
    { 0x02, "get", "nm thresh get [domain <platform|CPU|Memory>] policy_id <policy>" },
+   { 0xFF, NULL, NULL },
 };

@@ -497,6 +501,7 @@
 const struct dcmi_cmd nm_suspend_cmds[] = {
    { 0x01, "set", "nm suspend set [domain <platform|CPU|Memory]> policy_id <policy> <start> <stop> <pattern>" },
    { 0x02, "get", "nm suspend get [domain <platform|CPU|Memory]> policy_id <policy>" },
+   { 0xFF, NULL, NULL },
 };

Discussion

  • Alexander Amelkin

    • labels: --> segfault, nm, dcmi
    • status: open --> closed-fixed
    • assigned_to: Alexander Amelkin
    • Group: version-1.8.18 --> version-1.8.19
     
  • Alexander Amelkin

    This has been fixed with [6d9c54].
    Next time please do not copy-paste patches (they get broken). Attach them or create pull requests.

     

    Related

    Commit: [6d9c54]

  • Alexander Amelkin

    • labels: segfault, nm, dcmi -->
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,6 +4,7 @@
        3. nm_thresh_cmds
        4. nm_suspend_cmds
    
    +```
     diff -ruN ipmitool-1.8.18.orig/lib/ipmi_dcmi.c ipmitool-1.8.18.new/lib/ipmi_dcmi.c
     --- ipmitool-1.8.18.orig/lib/ipmi_dcmi.c   2018-02-27 19:01:37.949879900 +0800
     +++ ipmitool-1.8.18.new/lib/ipmi_dcmi.c    2018-03-01 11:17:22.642570311 +0800
    @@ -34,3 +35,4 @@
        { 0x02, "get", "nm suspend get [domain <platform|CPU|Memory]> policy_id <policy>" },
     +  { 0xFF, NULL, NULL },
      };
    +```
    
     

Log in to post a comment.