path: root/src/eap_server/eap_server_pax.c
Commit message (Collapse)AuthorAgeFilesLines
* EAP-PAX server: Avoid debug prints of uninitialized memory in error casesJouni Malinen2019-05-081-6/+20
| | | | | | | | | Use a separate error case handler for eap_pax_mac() failures and memcmp to avoid wpa_hexdump() calls for the (mainly theoretical) local error cases in deriving the MAC. Fixes: b3c2b5d9f7d8 ("EAP-PAX server: Check hash function results") Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
* EAP-PAX server: Fix message length checks for MSGDUMP level hexdumpJouni Malinen2019-04-191-1/+1
| | | | | | | | | EAP-PAX server implementation could end up reading beyond the end of the buffer if MSGDUMP level debugging was enabled and a message without the ICV field was received. Fix this by using more strict message length validation. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-PAX server: Check hash function resultsJouni Malinen2019-04-191-24/+39
| | | | | | | While these local failure cases are mostly theoretical, it is better to check for the errors explicitly. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use os_memdup()Johannes Berg2017-03-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | This leads to cleaner code overall, and also reduces the size of the hostapd and wpa_supplicant binaries (in hwsim test build on x86_64) by about 2.5 and 3.5KiB respectively. The mechanical conversions all over the code were done with the following spatch: @@ expression SIZE, SRC; expression a; @@ -a = os_malloc(SIZE); +a = os_memdup(SRC, SIZE); <... if (!a) {...} ...> -os_memcpy(a, SRC, SIZE); Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* EAP server: Simplify EAP method registration callJouni Malinen2016-01-131-5/+1
| | | | | | | | | Free the allocated structure in error cases to remove need for each EAP method to handle the error cases separately. Each registration function can simply do "return eap_server_method_register(eap);" in the end of the function. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* EAP-PAX: Derive EAP Session-IdJouni Malinen2014-11-301-1/+23
| | | | | | | This adds EAP-PAX server and peer method functions for deriving Session-Id from Method-Id per RFC 4746 and RFC 5247. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-PAX server: Remove unused assignmentJouni Malinen2014-10-111-1/+0
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-PAX server: Add explicit CID length limitJouni Malinen2014-09-071-2/+7
| | | | | | | | | Instead of using implicit limit based on 16-bit unsigned integer having a maximum value of 65535, limit the maximum length of a CID explicitly to 1500 bytes. This will hopefully help in reducing false warnings from static analyzers (CID 72712). Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP server: Clear keying material on deinitJouni Malinen2014-07-021-1/+1
| | | | | | | | | Reduce the amount of time keying material (MSK, EMSK, temporary private data) remains in memory in EAP methods. This provides additional protection should there be any issues that could expose process memory to external observers. Signed-off-by: Jouni Malinen <j@w1.fi>
* EAP-PAX: Use os_memcmp_const() for hash/password comparisonsJouni Malinen2014-07-021-3/+3
| | | | | | | | | This makes the implementation less likely to provide useful timing information to potential attackers from comparisons of information received from a remote device and private material known only by the authorized devices. Signed-off-by: Jouni Malinen <j@w1.fi>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* Annotate places depending on strong random numbersJouni Malinen2010-11-231-1/+2
| | | | | | | | | | | | | This commit adds a new wrapper, random_get_bytes(), that is currently defined to use os_get_random() as is. The places using random_get_bytes() depend on the returned value being strong random number, i.e., something that is infeasible for external device to figure out. These values are used either directly as a key or as nonces/challenges that are used as input for key derivation or authentication. The remaining direct uses of os_get_random() do not need as strong random numbers to function correctly.
* Rename EAP server source files to avoid duplicate namesJouni Malinen2010-02-191-0/+569
This makes it easier to build both EAP peer and server functionality into the same project with some toolchains.