wpa_auth: Make struct wpa_auth_callbacks const
Instead of copying the struct wpa_auth_callbacks, just keep a pointer to it, keep the context pointer separate, and let the user just provide a static const structure. This reduces the attack surface of heap overwrites, since the function pointers move elsewhere. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
30eddf3529
commit
cef8fac04b
7 changed files with 100 additions and 102 deletions
|
@ -203,7 +203,8 @@ struct wpa_authenticator {
|
|||
struct wpa_stsl_negotiation *stsl_negotiations;
|
||||
|
||||
struct wpa_auth_config conf;
|
||||
struct wpa_auth_callbacks cb;
|
||||
const struct wpa_auth_callbacks *cb;
|
||||
void *cb_ctx;
|
||||
|
||||
u8 *wpa_ie;
|
||||
size_t wpa_ie_len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue