Skip to content

Conversation

@giuseppe
Copy link
Member

@giuseppe giuseppe commented Apr 7, 2025

Closes: #2411

Closes: containers#2411

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Apr 7, 2025

LGTM

"fadvise64",
"fadvise64_64",
"fallocate",
"fanotify_init",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This places no restrictions on the arguments. Will this allow a container running as root to make the kernel go OOM by using FAN_UNLIMITED_MARKS?

In other words do the restrictions described here need to be reflected in the policy?

The limitations imposed on an event listener created by a user without the CAP_SYS_ADMIN capability are as follows:

https://www.man7.org/linux/man-pages/man2/fanotify_init.2.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that requires CAP_SYS_ADMIN, we don't grant CAP_SYS_ADMIN by default, even for root

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I assume then there's no underlying reason it was required to be in the list in the first place. Basically just duplication of the checks done by the kernel any way.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 099375a into containers:main Apr 7, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

seccomp policy should allow fanotify_init without CAP_SYS_ADMIN

4 participants