apache / apache/teaclave-sgx-sdk

Problem in signing an enclave library linked with libgmp

Open
#348 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.2k
Forks
268
PR merge metrics
No merged PRs in 30d

Description

Hi,

We're using a Rust library which depends on `rust-gmp` which also depends on `libgmp`. We are able to produce `enclave.so` by linking the `libgmp`. But in the last phase, during the signing process, we get the following error:

```bash
LINK => enclave/enclave.so
mkdir -p bin

0
0
0x40000
0x100000
1
1
0
0
0xFFFFFFFF

[check_symbol_table elfparser.cpp:253] symbol '__gmpz_cmp' is undefined
Symbol table incorrect
The input enclave file is not correct.
Error happened while signing the enclave.
Makefile:134: recipe for target 'bin/enclave.signed.so' failed
make: *** [bin/enclave.signed.so] Error 255
```

Is there a solution to this problem?
@dingelish

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Makefile target for bin/enclave.signed.so and the signing output, then trace how enclave/enclave.so is linked with rust-gmp and libgmp. Investigate why __gmpz_cmp remains undefined in the ELF symbol table; done means the enclave signs successfully without the Symbol table incorrect error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.