Why the leaked file descriptor pointing to cgroup described in CVE-2024-21626 can not be seen via /proc/xxx/fd
either inside the container or on the host
#4213
-
As the title speaking, I understood the issue is due to a remaining opened file descriptor by BTW, my worker system is
and runc version is
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Because we use ‘exece’ to start the container init process, before execve, runc has marked all unnecessary opened fds as ‘close-on-exec’. We can only see it before execve. Please see: |
Beta Was this translation helpful? Give feedback.
-
The file descriptor was not leaked to the container, it was an internal file descriptor leak to While some other folks described the issue as a simple "file descriptor leak", this is not entirely accurate. We have had code to ensure that we do not leak extra file descriptors to the container before said The oversight was that it was possible to maliciously configure the container so that |
Beta Was this translation helpful? Give feedback.
The file descriptor was not leaked to the container, it was an internal file descriptor leak to
runc init
(which is the process that eventually does anexec
to become the container process).While some other folks described the issue as a simple "file descriptor leak", this is not entirely accurate. We have had code to ensure that we do not leak extra file descriptors to the container before said
exec
since 2014.The oversight was that it was possible to maliciously configure the container so that
runc init
uses that file descriptor to escape before it is closed beforeexec
. (We have had to add new bits of hardening to this over time -- we found a kernel bug withO_CLOEXEC
and the dumpabl…