[QNN-EP] Fix use-after-free of logger object#27804
Merged
edgchen1 merged 1 commit intomicrosoft:mainfrom Mar 31, 2026
Merged
Conversation
Contributor
|
@edgchen1 |
tirupath-qti
approved these changes
Mar 24, 2026
edgchen1
reviewed
Mar 24, 2026
Contributor
|
/azp run Windows ARM64 QNN CI Pipeline,Linux QNN CI Pipeline |
|
Azure Pipelines successfully started running 2 pipeline(s). |
780951d to
2aacbe6
Compare
Contributor
|
/azp run Windows ARM64 QNN CI Pipeline,Linux QNN CI Pipeline |
While generating weight sharing context binary, Inference Session is created once for each graph. Inference session creates logger object and passes it to QnnBackendManager. QnnBackendManager stores this pointer in logger_ pointer and holds it long after Inference Session is destroys Logger. On next Inference Session, another Logger object is created but QnnBackendManager do not use this as backend_setup_completed_ is already set.
2aacbe6 to
38a149e
Compare
Contributor
Author
|
@microsoft-github-policy-service agree company="Qualcomm" |
Contributor
|
/azp run Windows ARM64 QNN CI Pipeline,Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows GPU Doc Gen CI Pipeline |
|
Azure Pipelines successfully started running 4 pipeline(s). |
edgchen1
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update logger object in QnnBackendManager::SetupBackend.
Motivation and Context
While generating weight sharing context binary, Inference Session is created once for each graph. Inference session creates logger object and passes it to QnnBackendManager. QnnBackendManager stores this pointer in logger_ pointer and holds it long after Inference Session destroys Logger. On next Inference Session, another Logger object is created but QnnBackendManager do not use this as backend_setup_completed_ is already set, using this causes UAF.