summaryrefslogtreecommitdiff
path: root/scripts/include/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorTuo Li <islituo@gmail.com>2025-12-21 02:11:49 +0800
committerIlya Dryomov <idryomov@gmail.com>2026-01-05 13:28:26 +0100
commite3fe30e57649c551757a02e1cad073c47e1e075e (patch)
tree32f7f7bc242d294aeb27f053549e8fa381c2c2d5 /scripts/include/git@git.tavy.me:linux.git
parentbc417a4baf0badbcb30325cabdaf433d8256c0e3 (diff)
libceph: make free_choose_arg_map() resilient to partial allocation
free_choose_arg_map() may dereference a NULL pointer if its caller fails after a partial allocation. For example, in decode_choose_args(), if allocation of arg_map->args fails, execution jumps to the fail label and free_choose_arg_map() is called. Since arg_map->size is updated to a non-zero value before memory allocation, free_choose_arg_map() will iterate over arg_map->args and dereference a NULL pointer. To prevent this potential NULL pointer dereference and make free_choose_arg_map() more resilient, add checks for pointers before iterating. Cc: stable@vger.kernel.org Co-authored-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Tuo Li <islituo@gmail.com> Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'scripts/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions