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

poll: fix thread_cancel() caused poll used after free #13279

Merged
merged 2 commits into from
Sep 14, 2024

Conversation

GUIDINGLI
Copy link
Contributor

Summary

poll: fix thread_cancel() caused poll used after free

    pthread 0          pthread1
    fd 0
    poll_setup
    wait
                       cancel(thread 0)
                       fd 0 close
                       fd 0 notify (sem used after free)
    poll_teardown

Resolve:
Use pthread_cleanup / tls_cleanup to fix this

Impact

POLL

Testing

SIM

This should be build with apache/nuttx-apps#2548

Signed-off-by: ligd <liguiding1@xiaomi.com>
pthread 0          pthread1
fd 0
poll_setup
wait
                   cancel(thread 0)
                   fd 0 close
                   fd 0 notify (sem used after free)
poll_teardown

Signed-off-by: ligd <liguiding1@xiaomi.com>
@GUIDINGLI GUIDINGLI added the breaking change This change requires a mitigation entry in the release notes. label Sep 3, 2024
@acassis
Copy link
Contributor

acassis commented Sep 4, 2024

@GUIDINGLI why is ti "breaking change" ? Does the Apps will stop to work after that modification?

@GUIDINGLI
Copy link
Contributor Author

@GUIDINGLI why is ti "breaking change" ? Does the Apps will stop to work after that modification?

@acassis
"breaking change" means:
I have modify the MACRO, replace a name, and other developer need pay attention on this.

@xiaoxiang781216 xiaoxiang781216 merged commit fab9369 into apache:master Sep 14, 2024
6 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This change requires a mitigation entry in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants