Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Crash with EAP-PWD #1876
Comments
|
Also reproducible on Debian jessie. Caused by 41d68e6. |
|
Guess we actually need to pass an engine in? |
|
That's what it looks like. Maybe it depends on OpenSSL version... |
pauldekkers
commented
Jan 12, 2017
|
Right, reverting the 41d68e6 change resolves this indeed on 3.0.x |
|
Weirdly on the master branch and 1.0.0 stable HMAC_Init is just a wrapper (which passes NULL as the engine)... https://github.com/openssl/openssl/blob/c42a78cb57cd335f3e2b224d4d8c8d7c2ecfaa44/crypto/hmac/hmac.c#L83 |
|
rather cryptic note from openssl docs "HMAC_Init_ex() initializes or reuses a HMAC_CTX structure to use the function evp_md and key key. Either can be NULL , in which case the existing one will be reused. HMAC_CTX_init() must have been called before the first use of an HMAC_CTX in this function. N.B. HMAC_Init() had this undocumented behaviour in previous versions of OpenSSL - failure to switch to HMAC_Init_ex() in programs that expect it will cause them to stop working." |
|
yeah we're missing the appropriate call to |
|
never mind... probably done by |
|
Tried that - doesn't fix it. And it seems to depend on OpenSSL version - Not 1.1.0 here - maybe it works with |
|
Oh, actually, no - it crashes further on... so that's probably correct. |
|
Got it. There's another HMAC_Init_ex futher down that needs the same treatment. I'll sort a patch. |
mcnewton
added a commit
to mcnewton/freeradius-server
that referenced
this issue
Jan 12, 2017
|
|
mcnewton |
d014b8b
|
|
Yeah - it's fine on v4.0.x, as you say guess it's due to the HMAC_CTX_new(). |
mcnewton
added a commit
that referenced
this issue
Jan 12, 2017
|
|
mcnewton |
a28b2a4
|
mcnewton
closed this
Jan 12, 2017
|
Great |
pauldekkers
commented
Jan 12, 2017
|
Yes, works for me! Thanks |
pauldekkers commentedJan 12, 2017
•
edited
Issue type
Defect/Feature description
EAP-PWD crashes FreeRADIUS (tested on CentOS 6, CentOS 7 and Ubuntu 16.04)
How to reproduce issue
Compiled FreeRADIUS 3.0.x (git, 3.0.13 at time of writing) with:
./configure --prefix=/home/centos/freeradius --enable-developer
Crash both experienced with ldap and files module for accounts.
Minimal FreeRADIUS config is
paul Cleartext-Password := "testing123"
eapol_test file:
Output of
[radiusd|freeradius] -Xshowing issue occurringFull backtrace from LLDB or GDB
Backtrace:
On Ubuntu 16.04