libct: add a defer fd close in createDeviceNode#5022
libct: add a defer fd close in createDeviceNode#5022lifubang wants to merge 1 commit intoopencontainers:mainfrom
Conversation
Signed-off-by: lifubang <lifubang@acmcoder.com>
cyphar
left a comment
There was a problem hiding this comment.
Thanks, my bad for missing this.
|
I've applied this change locally to 1.2.8 and it doesn't appear to solve the problem. I will try debugging a bit more. |
I think you also need to apply this one: cyphar/filepath-securejoin#85 |
|
Thanks for the pointer - however, adding that patch in doesn't seem to solve our issue either. One additional data point is that the leak we're seeing appears to be non-deterministic; for example, the issue doesn't reproduce when we run our reproducer under |
|
I apologize - these patches do solve our problem, my test just wasnt compatible with some runc security features. Thanks for the fix, and sorry for the noise. |
No need to apologize, many thanks for your test and confirm. |
|
This has been cherry-picked into #5026, closing in favour of that. |
Fix: #5021
Without deferring the closure of this file descriptor, starting a container with a very large number of devices can hit the RLIMIT_NOFILE limit.