You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix bug in MCA_PML_OB1_ADD_ACK_TO_PENDING that causes memory overruns or failure
The MCA_PML_OB1_ADD_ACK_TO_PENDING method creates a mca_pml_ob1_pckt_pending_t
to hold an ack to be sent later. This method builds the pending packet then puts
it on the mca_pml_ob1.pckt_pending list for later transmission. It does not,
however, set the required hdr_size field on the struct. This leads to issues
when the packet is later sent because it could contain any value. With some btls
this will lead to memory corruption (if the size is not checked against
btl_max_send_size) or just allocation failure because the size is too big. In
other situations it could lead to a truncated packet being send (if the size
previously in hdr_size is smaller than an ack).
To fix the issue this commit gets rid of the macro entirely and replaces it with
a new inline helper method that does the same thing. This helper uses the
existing mca_pml_ob1_add_to_pending helper (which sets hdr_size) to reduce
duplicated code.
Tested and verified this fixes a critical issue triggered on our hardware.
Signed-off-by: Nathan Hjelm <[email protected]>
0 commit comments