Commit 0f43e16
[QNN-EP] Fix use-after-free of logger object (#27804)
### 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.
Co-authored-by: Trishansh Bhardwaj <quic_tbhardwa@quicinc.com>1 parent f22e3a9 commit 0f43e16
2 files changed
Lines changed: 5 additions & 5 deletions
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
472 | | - | |
473 | | - | |
| 471 | + | |
474 | 472 | | |
475 | 473 | | |
476 | 474 | | |
| |||
1564 | 1562 | | |
1565 | 1563 | | |
1566 | 1564 | | |
| 1565 | + | |
| 1566 | + | |
1567 | 1567 | | |
1568 | 1568 | | |
1569 | 1569 | | |
| |||
1630 | 1630 | | |
1631 | 1631 | | |
1632 | 1632 | | |
1633 | | - | |
| 1633 | + | |
1634 | 1634 | | |
1635 | 1635 | | |
1636 | 1636 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
0 commit comments