Skip to content

Font loading and security #720

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
sherief opened this issue Jun 30, 2016 · 2 comments
Closed

Font loading and security #720

sherief opened this issue Jun 30, 2016 · 2 comments

Comments

@sherief
Copy link

sherief commented Jun 30, 2016

Font formats have commonly been used as an attack vector and parsing an untrusted font is a security risk. I've been wanting to integrate imgui into a project with above average security requirements and that also benefits greatly from having user-loadable fonts. The bundled STB library for font handling is a very convenient, single-file solution for loading fonts, having the option to supply another font loader (like FreeType2) would be great, and even better if it can be some interface the client can provide so I can implement more in-depth schemes like font parsing in a separate process.

Would there be interest in adding such functionality to imgui?

@ocornut
Copy link
Owner

ocornut commented Jun 30, 2016

Also see #618

To clarify ImGui isn't designed to be secure using untrusted data (since it was designed for games and games tools). It's designed to handle 99% cases well but I'm pretty sure one could craft strings or data that would lead to applications misbehaving. I am not aware of any known crash within a correctly formed program but nobody really tried to investigate for that.

Since performances are an important part of the library, if ever somebody stumbled on a rare crash triggered by intentionally-malformed data, and the only possible fix would involve a non-negligible performance penalty, I would rather not fix it. I don't realistically see this situation happening but this is to let you know what are the priorities of this project.

@ocornut
Copy link
Owner

ocornut commented Jul 12, 2016

@sherief Closing this. If you want to specifically work on supporting FreeType2 natively please refer to #618.

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

2 participants