From: Alan T. DeKok Date: Sat, 7 Mar 2026 14:19:03 +0000 (-0500) Subject: check for invalid MS-CHAP attributes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc60da856a3965f405354ffa7e81c6bdd596aaaf;p=thirdparty%2Ffreeradius-server.git check for invalid MS-CHAP attributes --- diff --git a/src/modules/rlm_mschap/opendir.c b/src/modules/rlm_mschap/opendir.c index 44b0a1fbfba..b021683b77a 100644 --- a/src/modules/rlm_mschap/opendir.c +++ b/src/modules/rlm_mschap/opendir.c @@ -256,6 +256,10 @@ unlang_action_t od_mschap_auth(unlang_result_t *p_result, request_t *request, fr #endif response = fr_pair_find_by_da_nested(&request->request_pairs, NULL, tmpl_attr_tail_da(env_data->chap2_response)); + if (!response) { + RERROR("No MS-CHAP2-Response in request"); + RETURN_UNLANG_FAIL; + } username_string = talloc_array(request, char, usernamepair->vp_length + 1); if (!username_string) RETURN_UNLANG_FAIL;