Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are 2 memory leak in function lim_process_fils_eap_tlv #1

Open
zounathan opened this issue Mar 23, 2022 · 0 comments
Open

There are 2 memory leak in function lim_process_fils_eap_tlv #1

zounathan opened this issue Mar 23, 2022 · 0 comments

Comments

@zounathan
Copy link

		switch (tlv->type) {
			case SIR_FILS_EAP_TLV_KEYNAME_NAI:
				auth_info->keyname = vos_mem_malloc(tlv->length);
				if (!auth_info->keyname) {
					VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
							FL("failed to alloc memory"));
					return 0;
				}
				vos_mem_copy(auth_info->keyname,
						tlv->data, tlv->length);
				auth_info->keylength = tlv->length;
				data_len -= (tlv->length + 2);
				wrapped_data += (tlv->length + 2);
				break;
                         ...
			case SIR_FILS_EAP_TLV_DOMAIN_NAME:
				auth_info->domain_name = vos_mem_malloc(tlv->length);
				if (!auth_info->domain_name) {
					VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
							FL("failed to alloc memory"));
					return 0;
				}
				vos_mem_copy(auth_info->domain_name,
						tlv->data, tlv->length);
				auth_info->domain_len = tlv->length;
				data_len -= (tlv->length + 2);
				wrapped_data += (tlv->length + 2);
				break;
				/* TODO process these now */

If there are some SIR_FILS_EAP_TLV_KEYNAME_NAI or SIR_FILS_EAP_TLV_DOMAIN_NAME tlvs, it leads to memory leak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant