Skip to content

Conversation

@copybara-service
Copy link

Fix leaking /proc/self/mem of a new process after execve.

memFD is linked with the Task instead of MemoryManager. At the time of
read/write, it uses Task's MemoryManager. However, it should have used Task's
MemoryManager from the time when we do open. To fix it, we store the
MemoryManager at the time of opening /proc/self/mem.

Added the reproducer as a test.

@copybara-service copybara-service bot added the exported Issue was exported automatically label Aug 1, 2025
memFD is linked with the Task instead of MemoryManager. At the time of
read/write, it uses Task's MemoryManager. However, it should have used Task's
MemoryManager from the time when we do open. To fix it, we store the
MemoryManager at the time of opening /proc/self/mem.

Added the reproducer as a test.

PiperOrigin-RevId: 791327639
@copybara-service copybara-service bot merged commit 1fb4c08 into master Aug 5, 2025
0 of 2 checks passed
@copybara-service copybara-service bot deleted the test/cl760855949 branch August 5, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant