Skip to content

DAOS-19350 object: validate array IOD recxs#18711

Open
gnailzenh wants to merge 1 commit into
release/2.6from
liang/b2_6_iod_valid
Open

DAOS-19350 object: validate array IOD recxs#18711
gnailzenh wants to merge 1 commit into
release/2.6from
liang/b2_6_iod_valid

Conversation

@gnailzenh

Copy link
Copy Markdown
Collaborator

Because Object fetch tasks retain caller-owned IOD pointers, and RPC encoding may be deferred or repeated during a retry, if an asynchronous caller clears or reuses an IOD before completion, encoding can observe a positive iod_nr with a NULL iod_recxs, DAOS engine can crash in this case before it doesn't do enough defensive check.

This patch includes these changes:

  • Reject array IODs with a positive extent count and no recx array during client validation and RPC encoding.

  • Add a server-side guard to prevent malformed requests from reaching VOS.

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

Because Object fetch tasks retain caller-owned IOD pointers, and RPC encoding
may be deferred or repeated during a retry, if an asynchronous caller clears
or reuses an IOD before completion, encoding can observe a positive iod_nr with
a NULL iod_recxs, DAOS engine can crash in this case before it doesn't do enough
defensive check.

This patch includes these changes:
- Reject array IODs with a positive extent count and no recx array during client
 validation and RPC encoding.

- Add a server-side guard to prevent malformed requests from reaching VOS.

Signed-off-by: Liang Zhen <gnailzenh@gmail.com>
@gnailzenh
gnailzenh requested review from a team as code owners July 23, 2026 17:11
@github-actions

Copy link
Copy Markdown

Ticket title is 'repeated engine segfaults on daos_user'
Status is 'Open'
https://daosio.atlassian.net/browse/DAOS-19350

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Test RPMs on EL 8.6 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-18711/1/display/redirect

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-18711/1/display/redirect

1 similar comment
@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-18711/1/display/redirect

Comment thread src/object/obj_rpc.c
D_GOTO(out, rc = 0);
#endif

if (ENCODING(proc_op) && iod->iod_type == DAOS_IOD_ARRAY && iod->iod_recxs == NULL) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, but if app itself with problem that freed or reused the iod/iod_recxs, the iod_recxs possibly still is inaccessiable even when it is non NULL.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes, in this case it will corrupt the app buffer, but this is a bug of app itself, so the outcome if OK.

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

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