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

test mincore() restriction #460

Closed
metan-ucw opened this issue Jan 8, 2019 · 0 comments
Closed

test mincore() restriction #460

metan-ucw opened this issue Jan 8, 2019 · 0 comments

Comments

@metan-ucw
Copy link
Member

Looks like mincore() could have been used as a side channel because it could have shown which pages of dynamic libraries are in the page cache, that together with forcing memory out of the page cache can expose which functions are called in a victim program. See: https://arxiv.org/pdf/1901.01161.pdf

The fix to this problem mincore() will be allowed to only reveal mapped pages instead:

commit 574823bfab82d9d8fa47f422778043fbb4b4f50e
Author: Linus Torvalds torvalds@linux-foundation.org
Date: Sat Jan 5 17:50:59 2019 -0800

Change mincore() to count "mapped" pages rather than "cached" pages

It's not yet sure if the patch will make it to the final release, but there will be some solution to the problem and we should write a test for it.

pevik pushed a commit to pevik/ltp that referenced this issue Aug 3, 2020
It tests the result of mincore when memory is mapped and cached by
another process. A file is mapped in both parent and child
process.Then the mapped memory is accessed in the child process. The
results of mincore are tested in the parent process.

References:linux-test-project#460

Signed-off-by: Shwetha Subramanian. <shwetha@zilogic.com>
Reviewed-by:Vijay Kumar B. <vijaykumar@zilogic.com>
Acked-by: Jan Stancek <jstancek@redhat.com>
@pevik pevik closed this as completed in a6c8680 Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant