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

Potential Heap Buffer overflow in tee_supp_com.c #52

Open
Machiry opened this issue May 31, 2016 · 3 comments
Open

Potential Heap Buffer overflow in tee_supp_com.c #52

Machiry opened this issue May 31, 2016 · 3 comments

Comments

@Machiry
Copy link

Machiry commented May 31, 2016

At https://github.com/OP-TEE/optee_linuxdriver/blob/master/core/tee_supp_com.c#L215, commFromUser.nbr_bf is completely user controlled and it could be greater than TEE_RPC_BUFFER_NUMBER, this potentially leads to for loop reading and writing to heap over bounds.

@jenswi-linaro
Copy link
Contributor

Hi,

We don't use this driver any more, https://github.com/OP-TEE/optee_linuxdriver#2016-04-17-driver-has-been-deprecated

You're very welcome to review the new driver (which we're trying to upstream) at https://github.com/linaro-swg/linux/tree/optee/drivers/tee or even better when I post the next version of the patch set later this week.

@Machiry
Copy link
Author

Machiry commented Jun 1, 2016

Sure, but it seems kinda dangerous to have this code hanging. I hope your set of patches fixes these. I know people who are using this :(.

@jbech-linaro
Copy link
Contributor

@Machiry, thanks for reporting. If you can send patches solving the issue on the deprecated driver which at the same time doesn't cause any regressions on OP-TEE 2.0.0, then I'm willing to merge your fix. If it's not possible to make a compatible fix, then we eventually could create forked a "legacy-branch" intended for bug-fixes on pre OP-TEE 2.0.0. But, this won't be something that we actively nor officially support, simply because we don't have the bandwidth to deal with that also.

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

3 participants