Skip to content

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

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

Merged
merged 1 commit into from
Aug 5, 2025

Conversation

copybara-service[bot]
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.

0 participants