Skip to content
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

ulfm: Fix use-after-free in ishrink implementation #12480

Merged
merged 1 commit into from Apr 22, 2024

Conversation

dalcinl
Copy link
Contributor

@dalcinl dalcinl commented Apr 20, 2024

ompi_comm_request_return(req) releases the internal req->context. Therefore, any OBJ_RELEASE(context->xxx) MUST be called BEFORE ompi_comm_request_return(), otherwise it is a use-after-free.

Follow up of #12384.

cc @bosilca @abouteiller

`ompi_comm_request_return(req)` releases the internal `req->context`.
Therefore, any `OBJ_RELEASE(context->xxx)` **MUST** be called **BEFORE**
`ompi_comm_request_return()`, otherwise it is a use-after-free.

Signed-off-by: Lisandro Dalcin <dalcinl@gmail.com>
@bosilca
Copy link
Member

bosilca commented Apr 20, 2024

There are more concerning issues with the code targeted by this PR (such as freeing a request that has been already given to the user level). We will audit the code and come up with a solution. If interested in knowing more please check #12479.

@dalcinl
Copy link
Contributor Author

dalcinl commented Apr 22, 2024

@bosilca What should I do with this PR then? Should I just close it?

@bosilca
Copy link
Member

bosilca commented Apr 22, 2024

Let's merge this, it fixes a problem that currently exists in main.

@bosilca bosilca merged commit d908244 into open-mpi:main Apr 22, 2024
17 checks passed
@dalcinl dalcinl mentioned this pull request Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants