mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacmn: Reset keys to zero after use
In functions that use key values, reset the local variables (key) to zero after use to avoid security vulnerability. Change-Id: I105b1abf7c707102ef99bbe4fa213708039d933e CRs-fixed: 2581402
This commit is contained in:
parent
3d15ae8780
commit
9a1b59247c
2 changed files with 5 additions and 0 deletions
|
|
@ -220,6 +220,8 @@ QDF_STATUS target_if_crypto_set_key(struct wlan_objmgr_vdev *vdev,
|
|||
¶ms.key_rsc_ctr, sizeof(uint64_t));
|
||||
status = wmi_unified_setup_install_key_cmd(pdev_wmi_handle, ¶ms);
|
||||
|
||||
/* Zero-out local key variables */
|
||||
qdf_mem_zero(¶ms, sizeof(struct set_key_params));
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1104,6 +1104,9 @@ QDF_STATUS wlan_crypto_delkey(struct wlan_objmgr_vdev *vdev,
|
|||
qdf_mem_free(key->private);
|
||||
}
|
||||
}
|
||||
|
||||
/* Zero-out local key variables */
|
||||
qdf_mem_zero(key, sizeof(struct wlan_crypto_key));
|
||||
qdf_mem_free(key);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
|
|
|||
Loading…
Reference in a new issue