diff options
| author | Carlos Llamas <[email protected]> | 2022-05-17 18:58:17 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2022-05-19 18:41:26 +0200 |
| commit | dafa5e9ab8b5b31d64c0ded188d95f8bb6be9746 (patch) | |
| tree | e858cd584328605834333c3d898e6d8971119720 /tools/perf/scripts/python/stackcollapse.py | |
| parent | da4864962d768b33e3bc31cd233270af6226686d (diff) | |
binder: fix potential UAF of target_{proc,thread}
Commit 9474be34a727 ("binder: add failed transaction logging info")
dereferences target_{proc,thread} after they have been potentially
freed by binder_proc_dec_tmpref() and binder_thread_dec_tmpref().
This patch delays the release of the two references after their last
usage. Fixes the following two errors reported by smatch:
drivers/android/binder.c:3562 binder_transaction() error: dereferencing freed memory 'target_proc'
drivers/android/binder.c:3563 binder_transaction() error: dereferencing freed memory 'target_thread'
Fixes: 9474be34a727 ("binder: add failed transaction logging info")
Reported-by: Dan Carpenter <[email protected]>
Acked-by: Todd Kjos <[email protected]>
Signed-off-by: Carlos Llamas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions