Skip to content

[CVE-2019-5736]: Server uses more memory if start many runc process at one time #1993

@lifubang

Description

@lifubang

Different from #1980 , If we start 100 runc processes at one time, the server will use about more 900M memory than before, it may cause failure. I don't know whether this is a problem or not?

root@iZ2ze1o61blvco5p5ducnnZ:/opt/busybox# cat runc100.sh 
#!/bin/bash
for i in {1..100}
do
	name="test$i"
	runc create $name &
done
echo "100 runc processes started."

Before fix:

root@iZ2ze1o61blvco5p5ducnnZ:/opt/busybox# free -m
              total        used        free      shared  buff/cache   available
Mem:           7983        3896        2256          39        1830        3618
Swap:             0           0           0
root@iZ2ze1o61blvco5p5ducnnZ:/opt/busybox# ./runc100.sh 
100 runc processes started.
root@iZ2ze1o61blvco5p5ducnnZ:/opt/busybox# free -m
              total        used        free      shared  buff/cache   available
Mem:           7983        4936        1178          40        1869        2545
Swap:             0           0           0

After fix:

root@iZ2ze1o61blvco5p5ducnnZ:/opt/busybox# free -m
              total        used        free      shared  buff/cache   available
Mem:           7983        3896        1980          39        2107        3621
Swap:             0           0           0
root@iZ2ze1o61blvco5p5ducnnZ:/opt/busybox# ./runc100.sh 
100 runc processes started.
root@iZ2ze1o61blvco5p5ducnnZ:/opt/busybox# free -m
              total        used        free      shared  buff/cache   available
Mem:           7983        4803         352        1107        2827        1611
Swap:             0           0           0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions