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

Support OpenSSL v1.1.0b in v3.0.x #1817

Closed
1 of 4 tasks
spbnick opened this issue Oct 31, 2016 · 12 comments
Closed
1 of 4 tasks

Support OpenSSL v1.1.0b in v3.0.x #1817

spbnick opened this issue Oct 31, 2016 · 12 comments

Comments

@spbnick
Copy link
Contributor

spbnick commented Oct 31, 2016

Issue type

  • Questions about the server or its usage should be posted to the users mailing list.
  • Remote security exploits MUST be sent to security@freeradius.org.
  • Defect - Crash or memory corruption.
  • Defect - Non compliance with a standards document, or incorrect API usage.
  • Defect - Unexpected behaviour (obvious or verified by project member).
  • Feature request.

Defect/Feature description

The v3.0.12 release, as well as the latest FreeRADIUS v3.0.x branch don't
build with OpenSSL v1.1.0b, in particular in Fedora Rawhide with openssl
package version 1:1.1.0b-3.fc26:

CC src/modules/rlm_eap/libeap/mppe_keys.c
src/modules/rlm_eap/libeap/mppe_keys.c: In function 'P_hash':
src/modules/rlm_eap/libeap/mppe_keys.c:40:11: error: storage size of 'ctx_a' isn't known
  HMAC_CTX ctx_a, ctx_out;
           ^~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:40:18: error: storage size of 'ctx_out' isn't known
  HMAC_CTX ctx_a, ctx_out;
                  ^~~~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:44:2: warning: implicit declaration of function 'HMAC_CTX_init' [-Wimplicit-function-declaration]
  HMAC_CTX_init(&ctx_a);
  ^~~~~~~~~~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:83:2: warning: implicit declaration of function 'HMAC_CTX_cleanup' [-Wimplicit-function-declaration]
  HMAC_CTX_cleanup(&ctx_a);
  ^~~~~~~~~~~~~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:40:18: warning: unused variable 'ctx_out' [-Wunused-variable]
  HMAC_CTX ctx_a, ctx_out;
                  ^~~~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:40:11: warning: unused variable 'ctx_a' [-Wunused-variable]
  HMAC_CTX ctx_a, ctx_out;
           ^~~~~
src/modules/rlm_eap/libeap/mppe_keys.c: In function 'eaptls_gen_eap_key':
src/modules/rlm_eap/libeap/mppe_keys.c:250:17: error: dereferencing pointer to incomplete type 'SSL {aka struct ssl_st}'
  memcpy(p + 1, s->s3->client_random, SSL3_RANDOM_SIZE);
                 ^~
make: *** [scripts/boiler.mk:635: build/objs/src/modules/rlm_eap/libeap/mppe_keys.lo] Error 1

Would it be possible to make FreeRADIUS v3.0.x build with OpenSSL v1.1.0b?
If yes, then when, and when a release supporting it will be available?

Thank you.

@alandekok
Copy link
Member

Would it be possible to make FreeRADIUS v3.0.x build with OpenSSL v1.1.0b?

I suppose.

If yes, then when, and when a release supporting it will be available?

You're free to submit a patch.

@arr2036
Copy link
Member

arr2036 commented Oct 31, 2016

It's fully supported in v3.1.x and v4.0.x so you should be able to pull in the fixes from there.

@spbnick
Copy link
Contributor Author

spbnick commented Oct 31, 2016

Thanks, @alandekok, I know, I'm always free to submit patches :) The question was rather if you're going to do it in the near future. I'll see if I can find the time to do it myself.

@arr2036 Thanks, I'll look for them. Can you tell what I should be looking for in the history to pinpoint the commits necessary? Or perhaps, what were the major changes adding support, in general?

@alandekok
Copy link
Member

The point is that this is open source. No one gets paid to work on it. Filing a bug and asking "when will this be fixed?" comes across as demanding that we jump immediately to make you happy. Which isn't friendly.

The file "mppe_keys.c" is in the same location in v3.1.x and in v3.0.x. Perhaps looking there would be a good idea.

@spbnick
Copy link
Contributor Author

spbnick commented Oct 31, 2016

@alandekok Sorry, didn't mean to come across that way, tried to be polite. Will work on my wording.

Sure, I looked at the differences, couldn't see what exactly is changing and assumed it wouldn't be the only place broken. So, not being able to fix it quickly myself came here with the question and a hope. Will look again.

@spbnick
Copy link
Contributor Author

spbnick commented Oct 31, 2016

For the record, the same issue happens on v3.1.x:

src/modules/rlm_eap/libeap/mppe_keys.c: In function 'P_hash':
src/modules/rlm_eap/libeap/mppe_keys.c:41:11: error: storage size of 'ctx_a' isn't known
  HMAC_CTX ctx_a, ctx_out;
           ^~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:41:18: error: storage size of 'ctx_out' isn't known
  HMAC_CTX ctx_a, ctx_out;
                  ^~~~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:45:2: warning: implicit declaration of function 'HMAC_CTX_init' [-Wimplicit-function-declaration]
  HMAC_CTX_init(&ctx_a);
  ^~~~~~~~~~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:80:2: warning: implicit declaration of function 'HMAC_CTX_cleanup' [-Wimplicit-function-declaration]
  HMAC_CTX_cleanup(&ctx_a);
  ^~~~~~~~~~~~~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:41:18: warning: unused variable 'ctx_out' [-Wunused-variable]
  HMAC_CTX ctx_a, ctx_out;
                  ^~~~~~~
src/modules/rlm_eap/libeap/mppe_keys.c:41:11: warning: unused variable 'ctx_a' [-Wunused-variable]
  HMAC_CTX ctx_a, ctx_out;
           ^~~~~
src/modules/rlm_eap/libeap/mppe_keys.c: In function 'eap_tls_gen_mppe_keys':
src/modules/rlm_eap/libeap/mppe_keys.c:171:14: error: dereferencing pointer to incomplete type 'SSL {aka struct ssl_st}'
   memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE);
              ^~
make: *** [scripts/boiler.mk:635: build/objs/src/modules/rlm_eap/libeap/mppe_keys.lo] Error 1

@arr2036
Copy link
Member

arr2036 commented Oct 31, 2016

Yeah apparently they added more things after the first alpha releases sigh. @alandekok is looking at fixing it in v4.0.x.

@spbnick
Copy link
Contributor Author

spbnick commented Nov 14, 2016

Just an update: I finally got it to build, but with a bunch of warnings. Will hunt them down and submit a draft pull request this week.

@herwinw
Copy link
Contributor

herwinw commented Nov 15, 2016

@spbnick You could use #1839 for inspiration

@spbnick
Copy link
Contributor Author

spbnick commented Nov 15, 2016

Thanks a lot, @herwinw, I will!

@arr2036
Copy link
Member

arr2036 commented Dec 9, 2016

Is this issue resolved now?

@spbnick
Copy link
Contributor Author

spbnick commented Dec 9, 2016

Yes, it is, thank you.

@spbnick spbnick closed this as completed Dec 9, 2016
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

4 participants