From: Greg KH <gregkh@linuxfoundation.org>
To: 杨男子 <nzyang@stu.xidian.edu.cn>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
security@kernel.org
Subject: Re: Report Bug to Linux File System
Date: Sun, 5 Sep 2021 19:16:46 +0200 [thread overview]
Message-ID: <YTT7fpL+FjFSAQzz@kroah.com> (raw)
In-Reply-To: <2a299595.245.17bb495fbfa.Coremail.nzyang@stu.xidian.edu.cn>
On Sun, Sep 05, 2021 at 02:12:13PM +0800, 杨男子 wrote:
> Hi, our team has found a problem in fs system on Linux kernel v5.10, leading to DoS attacks.
>
> The struct file can be exhausted by normal users by calling multiple syscalls such as timerfd_create/pipe/open etc. Although the rlimit limits the max fds could be opened by a single process. A normal user can fork multiple processes, repeatedly make the timerfd_create/pipe/open syscalls and exhaust all struct files. As a result, all struct-file-allocation related operations of all other users will fail.
>
> In fact, we try this attack inside a deprivileged docker container without any capabilities. The processes in the docker can exhaust all struct-file on the host kernel. We use a machine with 16G memory. We start 2000 processes, each process with a 1024 limit. In total, around 1613400 number struct-file are consumed and there are no available struct-file in the kernel. The total consumed memory is less than 2G , which is small, so memory control group can not help.
As has already been pointed out, containers are not any sort of
"resource boundry" to the overall system.
If you are concerned about processes using too many file handles, and
starving other processes on the system, then restrict them through the
nr_open sysctrl setting, that is what it is there for.
thanks,
greg k-h
prev parent reply other threads:[~2021-09-05 17:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-05 6:12 Report Bug to Linux File System 杨男子
2021-09-05 17:16 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YTT7fpL+FjFSAQzz@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=nzyang@stu.xidian.edu.cn \
--cc=security@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.