mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
KEYS: Fix use-after-free in assoc_array_gc()
An edit script should be considered inaccessible by a function once it has called assoc_array_apply_edit() or assoc_array_cancel_edit(). However, assoc_array_gc() is accessing the edit script just after the gc_complete: label. Reported-by: Andreea-Cristina Bernat <[email protected]> Signed-off-by: David Howells <[email protected]> Reviewed-by: Andreea-Cristina Bernat <[email protected]> cc: [email protected] cc: [email protected] Cc: [email protected] Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
876c6e3e02
commit
27419604f5
1 changed files with 1 additions and 1 deletions
|
|
@ -1735,7 +1735,7 @@ ascend_old_tree:
|
|||
gc_complete:
|
||||
edit->set[0].to = new_root;
|
||||
assoc_array_apply_edit(edit);
|
||||
edit->array->nr_leaves_on_tree = nr_leaves_on_tree;
|
||||
array->nr_leaves_on_tree = nr_leaves_on_tree;
|
||||
return 0;
|
||||
|
||||
enomem:
|
||||
|
|
|
|||
Loading…
Reference in a new issue