aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorZheng Wang <[email protected]>2022-11-10 11:50:33 +0800
committerGreg Kroah-Hartman <[email protected]>2022-11-23 19:55:48 +0100
commit643a16a0eb1d6ac23744bb6e90a00fc21148a9dc (patch)
tree7468067fe18759860b8d90c20707458c60e1199a /scripts/gdb/linux/utils.py
parentfd2c930cf6a5b9176382c15f9acb1996e76e25ad (diff)
misc: sgi-gru: fix use-after-free error in gru_set_context_option, gru_fault and gru_handle_user_call_os
In some bad situation, the gts may be freed gru_check_chiplet_assignment. The call chain can be gru_unload_context->gru_free_gru_context->gts_drop and kfree finally. However, the caller didn't know if the gts is freed or not and use it afterwards. This will trigger a Use after Free bug. Fix it by introducing a return value to see if it's in error path or not. Free the gts in caller if gru_check_chiplet_assignment check failed. Fixes: 55484c45dbec ("gru: allow users to specify gru chiplet 2") Signed-off-by: Zheng Wang <[email protected]> Acked-by: Dimitri Sivanich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions