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

Segfault running usr_study client application #19

Open
PedroBorges9 opened this issue Jul 19, 2016 · 4 comments
Open

Segfault running usr_study client application #19

PedroBorges9 opened this issue Jul 19, 2016 · 4 comments

Comments

@PedroBorges9
Copy link

Hello I've managed to compile and install Open-TEE on a Ubuntu VM.
I've managed to run conn_test successfully but the same is not true for the usr_study client application.
When I run it, the terminal output returns TEE_ERROR_TARGET_DEAD and I get a segfault on syslog:

Jul 19 11:36:56 ubuntu libuser_study.so/opt/OpenTee/lib/TAs/libuser_study.so: ../../TAs/usr_study_ta/usr_study_ta.c:TA_CreateEntryPoint:349 Calling the create entry point
Jul 19 11:36:56 ubuntu libuser_study.so/opt/OpenTee/lib/TAs/libuser_study.so: ../../TAs/usr_study_ta/usr_study_ta.c:TA_OpenSessionEntryPoint:366 Calling the Open session entry point
Jul 19 11:36:56 ubuntu kernel: [33768.564430] libuser_study.s[18408]: segfault at 7fa49eefdeb7 ip 00007fa39e63f4b8 sp 00007fa39d435e58 error 4 in libc-2.23.so[7fa39e4f2000+1c0000]

Also, I've tried building a simple client and trusted application by myself. I've followed the structure of usr_study and I'm getting the same segfault. It's related to a memmove on line 236 of usr_study_ta.c:

TEE_MemMove(new_trans->message, params[1].memref.buffer, ~params[1].memref.size);

@TanelDettenborn
Copy link
Member

Hi PedroBorges9,

I think that usr_study client/ta are working just fine :) Segfault is
expected if you are not fixed the TA. More information about user study:
http://open-tee.github.io/userstudy/

-Tanel

2016-07-19 11:50 GMT+01:00 PedroBorges9 [email protected]:

Hello I've managed to compile and install Open-TEE on a Ubuntu VM.
I've managed to run conn_test successfully but the same is not true for
the usr_study client application.
When I run it, the terminal output returns TEE_ERROR_TARGET_DEAD and I get
a segfault on syslog:

Jul 19 11:36:56 ubuntu
libuser_study.so/opt/OpenTee/lib/TAs/libuser_study.so:
../../TAs/usr_study_ta/usr_study_ta.c:TA_CreateEntryPoint:349 Calling the
create entry point
Jul 19 11:36:56 ubuntu
libuser_study.so/opt/OpenTee/lib/TAs/libuser_study.so:
../../TAs/usr_study_ta/usr_study_ta.c:TA_OpenSessionEntryPoint:366 Calling
the Open session entry point
Jul 19 11:36:56 ubuntu kernel: [33768.564430] libuser_study.s[18408]:
segfault at 7fa49eefdeb7 ip 00007fa39e63f4b8 sp 00007fa39d435e58 error 4 in
libc-2.23.so[7fa39e4f2000+1c0000]

Also, I've tried building a simple client and trusted application by
myself. I've followed the structure of usr_study and I'm getting the same
segfault. It's related to a memmove on line 236 of usr_study_ta.c:

TEE_MemMove(new_trans->message, params[1].memref.buffer,
~params[1].memref.size);


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#19, or mute the thread
https://github.com/notifications/unsubscribe-auth/AFbS3AUjLZvvTQlmqUQu1FNmuvI34rC3ks5qXKvfgaJpZM4JPmlU
.

@PedroBorges9
Copy link
Author

Oh ok I didn't realise that the user_study purposely had bugs for didactic purpose. Would it be possible to send me the code without the bugs as I'm not a C expert much less a GDB expert :)?

@TanelDettenborn
Copy link
Member

No problem, but i will do that a bit later because I do not have the
"solution" TA.

-Tanel

2016-07-19 12:07 GMT+01:00 PedroBorges9 [email protected]:

Oh ok I didn't realise that the user_study purposely had bugs for didactic
purpose. Would it be possible to send me the code without the bugs as I'm
not a C expert much less a GDB expert :)?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#19 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFbS3EQYOVv8APR2QFQU4H4mfBzJZWc6ks5qXK_3gaJpZM4JPmlU
.

@PedroBorges9
Copy link
Author

I think I got my CA working but still have errors on the usr_study.
Later will do fine. Thanks

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

2 participants