ompi icon indicating copy to clipboard operation
ompi copied to clipboard

coll/UCC: Fix uninitialized saved-coll-module-pointer use scenario

Open gkatev opened this issue 2 years ago • 4 comments

Hi, this fixes an edge-case uninitialized access in UCC, by adding proper initialization for the prev_module pointers.

If coll/ucc module initialization fails in mca_coll_ucc_save_coll_handlers() (e.g. #9885, or with ucc_enable=1 and ucc_priority=0), the pointers remain uninitialized, and might contain garbage when they are accessed in mca_coll_ucc_module_destruct() (triggered by coll/base). On my system, this resulted to segfaults.

Signed-off-by: George Katevenis [email protected]

gkatev avatar Jul 04 '22 15:07 gkatev

Can one of the admins verify this patch?

ompiteam-bot avatar Jul 04 '22 15:07 ompiteam-bot

ok to test

devreal avatar Jul 04 '22 15:07 devreal

/azp run

jsquyres avatar Jul 15 '22 12:07 jsquyres

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jul 15 '22 12:07 azure-pipelines[bot]

@vspetrov Yes that sounds appealing (I don't have a strong opinion). I can update the PR to use a struct+memset, and include scoll/ucc.

gkatev avatar Aug 18 '22 10:08 gkatev

@gkatev Can you please cherry-pick -x to v5.0.x?

gpaulsen avatar Aug 30 '22 19:08 gpaulsen