Skip to content

TLS link time errors when no entropy source #3071

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

Closed
c1728p9 opened this issue Oct 18, 2016 · 4 comments
Closed

TLS link time errors when no entropy source #3071

c1728p9 opened this issue Oct 18, 2016 · 4 comments

Comments

@c1728p9
Copy link
Contributor

c1728p9 commented Oct 18, 2016

Prior to PR #2843 security features were turned on even when null entropy was not. This allowed example programs with a link time dependency on TLS but did not actually use TLS to compile and work. One example of this is https://github.com/ARMmbed/mbed-os-example-mesh-minimal.

After PR #2843 examples like this started having linker issues on IAR and ARM since these compilers are less permissive about missing functions, even if they are never referenced. This causes confusing errors to users since it is not obvious that the culprit is a missing entropy source.

TLS should either provide stubs for these functions that have been compiled out, or make it an error to include TLS headers with prototypes that have their definitions turned off.

CC: @andresag01

@andresag01
Copy link

andresag01 commented Oct 19, 2016

I raised an issue in mbed TLS to address this problem Mbed-TLS/mbedtls#660.

@sg-
Copy link
Contributor

sg- commented Jan 19, 2017

Has this been resolved?

@simonbutcher
Copy link
Contributor

simonbutcher commented Jan 20, 2017

This bug was trying to generalise a solution for a specific bug in the mbed OS example for mesh minimal - "Cannot build for ARMCC on boards without TRNG #24".

The specific bug was fixed long ago in "Fix mbedtls user config and null entropy #2926", which changed the way the configurations were done.

However, the general problem which @c1728p9 described as ‘TLS should either provide stubs for these functions that have been compiled out, or make it an error to include TLS headers with prototypes that have their definitions turned off’ is not done, and is still pending work as the mbed TLS issue "Function declarations not conditionally compiled #660".

Because there is no specific or immediate problem for mbed OS, and because the issue is raised as a separate issue in the mbed TLS repo as bug #660, I see no need to keep this one open if you want to close it.

@bridadan
Copy link
Contributor

Thanks for the update @sbutcher-arm, I'll go ahead and close this then.

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

No branches or pull requests

5 participants