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

td-payload: decrypt private memory during allocation #664

Conversation

gaojiaqi7
Copy link
Member

@gaojiaqi7 gaojiaqi7 commented Mar 3, 2024

Decrypt the private memory at initialization will leak the data of the linked list allocator.

The solution can be moving decrytion to the moment the shared pages are allocated and encypting the shared memory before they are freed.

Closes: #662

Decrypt the private memory at initialization will leak the data of
the linked list allocator.

The solution can be moving decrytion to the moment the shared pages are
allocated and encypting the shared memory before they are freed.

Signed-off-by: Jiaqi Gao <[email protected]>
@jyao1
Copy link
Member

jyao1 commented Mar 4, 2024

I am not sure why we need this.

The expectation is that we pre-allocate a chunk of shared memory.
There should be NO secrete in the shared memory. Why we need to encrypt?

@gaojiaqi7
Copy link
Member Author

I am not sure why we need this.

The expectation is that we pre-allocate a chunk of shared memory. There should be NO secrete in the shared memory. Why we need to encrypt?

The allocator LockedHeap uses a linked list which puts allocation information in the free memory blocks.

Another solution can be using/realizing a bitmap allocator to put all the allocation information in the private memory

@gaojiaqi7
Copy link
Member Author

Close as the allocator data of shared memory is not confidence

@gaojiaqi7 gaojiaqi7 closed this Mar 5, 2024
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

Successfully merging this pull request may close these issues.

td-payload: issues with SharedMemory
2 participants