mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Validate kek_len in wlan_hdd_save_gtk_offload_params
Although the kek_len should have already been validated before the function is called, update wlan_hdd_save_gtk_offload_params() to limit kek_len to the maximum allowed value before using it to copy the kek. Change-Id: I0676521171343c6fe58afcdc31477f555598c490 CRs-Fixed: 2140033
This commit is contained in:
parent
f6c8932422
commit
e1f2b0e66a
1 changed files with 7 additions and 1 deletions
|
|
@ -5549,8 +5549,14 @@ void wlan_hdd_save_gtk_offload_params(struct hdd_adapter *adapter,
|
|||
if (kck_ptr)
|
||||
qdf_mem_copy(gtk_req->kck, kck_ptr, NL80211_KCK_LEN);
|
||||
|
||||
if (kek_ptr)
|
||||
if (kek_ptr) {
|
||||
/* paranoia */
|
||||
if (kek_len > sizeof(gtk_req->kek)) {
|
||||
kek_len = sizeof(gtk_req->kek);
|
||||
QDF_ASSERT(0);
|
||||
}
|
||||
qdf_mem_copy(gtk_req->kek, kek_ptr, kek_len);
|
||||
}
|
||||
|
||||
qdf_copy_macaddr(>k_req->bssid, &hdd_sta_ctx->conn_info.bssId);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue