We're hitting OOB accesses in handle_ipmb_direct_rcv_rsp() (memcpy of size -1) after user space generates a message. Looks like the message is incorrectly assumed to be of the new IPMB type, because type is never set and message is allocated with kmalloc() not kzalloc().
Unified · Split
| @@ -5033,6 +5033,7 @@ struct ipmi_smi_msg *ipmi_alloc_smi_msg(void) · 5032 unmodified lines | |||
| 5033 | if (rv) { | 5033 | if (rv) { |
| 5034 | rv->done = free_smi_msg; | 5034 | rv->done = free_smi_msg; |
| 5035 | rv->user_data = NULL; | 5035 | rv->user_data = NULL; |
| 5036 | rv->type = IPMI_SMI_MSG_TYPE_NORMAL; | ||
| 5036 | atomic_inc(&smi_msg_inuse_count); | 5037 | atomic_inc(&smi_msg_inuse_count); |
| 5037 | } | 5038 | } |
| 5038 | return rv; | 5039 | return rv; |