File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -517,11 +517,14 @@ static int wolfboot_dice_collect_claims(struct wolfboot_dice_claims *claims)
517517 XMEMSET (claims , 0 , sizeof (* claims ));
518518
519519 if (hal_uds_derive_key (uds , uds_len ) != 0 ) {
520+ /* Buffer may be partially filled, zero it to be sure */
521+ wolfboot_dice_zeroize (uds , sizeof (uds ));
520522 return WOLFBOOT_DICE_ERR_HW ;
521523 }
522524
523525 if (wolfboot_dice_get_ueid (claims -> ueid , & claims -> ueid_len ,
524526 uds , uds_len ) != 0 ) {
527+ wolfboot_dice_zeroize (uds , sizeof (uds ));
525528 return WOLFBOOT_DICE_ERR_HW ;
526529 }
527530
@@ -574,6 +577,7 @@ static int wolfboot_dice_collect_claims(struct wolfboot_dice_claims *claims)
574577 claims -> component_count ++ ;
575578 }
576579
580+ wolfboot_dice_zeroize (uds , sizeof (uds ));
577581 return WOLFBOOT_DICE_SUCCESS ;
578582}
579583
You can’t perform that action at this time.
0 commit comments