From: Daniil Sarafannikov Date: Thu, 11 Jun 2026 13:56:45 +0000 (+0400) Subject: kdc-heimdal: avoid NULL dereference when task is NULL X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34ebd366eb185f3674b191808686dbcfbb2ebee9;p=thirdparty%2Fsamba.git kdc-heimdal: avoid NULL dereference when task is NULL kdc_post_fork() may be called with NULL task pointer leading to a call of task_server_terminate() with NULL pointer, where it will be dereferenced. Add an explicit NULL check and instead of attempting to terminate a NULL task, log the error and return. Pair-Programmed-With: Timofei Fedotov Signed-off-by: Daniil Sarafannikov Reviewed-by: Anoop C S Reviewed-by: Gary Lockyer Autobuild-User(master): Anoop C S Autobuild-Date(master): Fri Jun 19 08:22:25 UTC 2026 on atb-devel-224 --- diff --git a/source4/kdc/kdc-heimdal.c b/source4/kdc/kdc-heimdal.c index 978de7a8caf..df58f947e72 100644 --- a/source4/kdc/kdc-heimdal.c +++ b/source4/kdc/kdc-heimdal.c @@ -334,7 +334,7 @@ static void kdc_post_fork(struct task_server *task, struct process_details *pd) int ldb_ret; if (task == NULL) { - task_server_terminate(task, "kdc: Null task", true); + DBG_ERR("kdc_post_fork: Null task\n"); return; } if (task->private_data == NULL) {