Skip to content

Commit 5a01702

Browse files
committed
Allow loop devices access for privileged containers
Add device cgroup rules to allow privileged containers access to: - All loop block devices (/dev/loop*) with rwm permissions - Loop control device (/dev/loop-control) with rwm permissions These rules enable loop device operations in privileged containers while maintaining security isolation for unprivileged containers.
1 parent 7225277 commit 5a01702

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

guardiancmd/server.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ var (
119119

120120
// We allow these
121121
{Access: "rwm", Type: fuseDevice.Type, Major: intRef(fuseDevice.Major), Minor: intRef(fuseDevice.Minor), Allow: true},
122+
123+
// Loop devices (privileged containers only)
124+
{Access: "rwm", Type: "b", Major: intRef(7), Minor: deviceWildcard(), Allow: true}, // /dev/loop*
125+
{Access: "rwm", Type: "c", Major: intRef(10), Minor: intRef(237), Allow: true}, // /dev/loop-control
122126
}
123127
)
124128

0 commit comments

Comments
 (0)