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

e_init crashes if EPIPHANY_HOME is not set; possible buffer overrun as well #52

Open
Urhixidur opened this issue Jun 16, 2015 · 0 comments

Comments

@Urhixidur
Copy link

e_init(char *hdf) misbehaves if the EPIPHANY_HOME environment variable is not set.

Looking in epiphany-hal.c, we see the fetch of hdf_env_var_name (set to "EPIPHANY_HDF") is guarded, whereas the following fetch of esdk_path (set to "EPIPHANY_HOME") is not. If esdk_env is NULL, strncpy() is called on a NULL src argument, a case which is not even mentioned in the strncpy man pages.

A secondary issue is the strncat used to build the platform.hdf path. Its n argument is too large and can potentially lead to a buffer overflow.

See https://parallella.org/forums/viewtopic.php?f=13&t=2544&p=14462#p14462 for proposed fixes.

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

1 participant