Commit c075f6c
committed
cve-2017-17052: tolerate ENOMEM during test
As each iteration of mmap_thread() grabs a fresh 16 MiB MAP_POPULATE
region and never releases it. With the loop runs, those regions
accumulate consuming both virtual address space and committed physical
memory right away instead of lazily.
Easily mmap() fails with ENOMEM on smaller/limit RAM resource system.
Error Log:
cve-2017-17052.c:48: TBROK: mmap((nil),16777216,PROT_READ(1),32802,-1,0) failed: ENOMEM (12)
tst_test.c:479: TINFO: Child process reported TBROK killing the test
tst_test.c:1909: TINFO: Killed the leftover descendant processes
Consider there is no practical upper bound on this allocation pattern,
so setting .min_mem_avail may not helps. Here we just tolerate ENOMEM
during the mmap_thread() looping.
Signed-off-by: Li Wang <liwang@redhat.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>1 parent 7e62f90 commit c075f6c
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | | - | |
| 50 | + | |
49 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
| |||
0 commit comments