Skip to content

DAOS-7238 test: another check of pool create svc_reps length #5558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

kccain
Copy link
Contributor

@kccain kccain commented Apr 24, 2021

Cherry-pick solution from a master-based branch.

As part of dmg_pool_create() flow, following successful execution
of the dmg pool create command, it is expected that the svc_reps
returned by dmg shall be of length > 0. Coverity CID 313058 reports
that a length of 0 would result in freeing of outpool->svc and a later
use after free. A fix was attempted in commit 353e115, adding a check
in parse_pool_info(). With this change, another check is made within
dmg_pool_create() closer to the d_rank_list_copy() call that would
free outpool->svc in this (believed to be theoretical) condition.

Signed-off-by: Kenneth Cain kenneth.c.cain@intel.com

Cherry-pick solution from a master-based branch.

As part of dmg_pool_create() flow, following successful execution
of the dmg pool create command, it is expected that the svc_reps
returned by dmg shall be of length > 0. Coverity CID 313058 reports
that a length of 0 would result in freeing of outpool->svc and a later
use after free. A fix was attempted in commit 353e115, adding a check
in parse_pool_info(). With this change, another check is made within
dmg_pool_create() closer to the d_rank_list_copy() call that would
free outpool->svc in this (believed to be theoretical) condition.

Signed-off-by: Kenneth Cain <kenneth.c.cain@intel.com>
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No errors found by checkpatch.

@dpquigl dpquigl requested review from jolivier23 and dpquigl April 26, 2021 16:22
@jolivier23 jolivier23 merged commit 6873129 into release/1.2 Apr 26, 2021
@jolivier23 jolivier23 deleted the kccain/daos_7238_pr2_rel1p2 branch April 26, 2021 16:40
@ashleypittman ashleypittman mentioned this pull request Apr 28, 2021
@ashleypittman ashleypittman mentioned this pull request May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants