[HSS] Fix stack buffer over-read when logging AK in Cx-MAR handler

The AK buffer is allocated with OGS_AK_LEN, but it was logged using
OGS_KEY_LEN, causing a stack buffer over-read under Address Sanitizer.
This change corrects the log length to OGS_AK_LEN.

Fixes the ASAN error reported during `volte cx-test`.

Issues: #4177
This commit is contained in:
Sukchan Lee 2025-11-30 22:15:46 +09:00
parent 39618c7a67
commit 54dda04121

View file

@ -670,7 +670,7 @@ static int hss_ogs_diam_cx_mar_cb(struct msg **msg, struct avp *avp,
ogs_log_print(OGS_LOG_DEBUG, "ik - ");
ogs_log_hexdump(OGS_LOG_DEBUG, ik, OGS_KEY_LEN);
ogs_log_print(OGS_LOG_DEBUG, "ak - ");
ogs_log_hexdump(OGS_LOG_DEBUG, ak, OGS_KEY_LEN);
ogs_log_hexdump(OGS_LOG_DEBUG, ak, OGS_AK_LEN);
ogs_log_print(OGS_LOG_DEBUG, "xles - ");
ogs_log_hexdump(OGS_LOG_DEBUG, xres, xres_len);