Skip to content

Commit 09d837b

Browse files
committed
Change /dev to be mounted by default with /noexec
Podman had an issue, where someone was attemptig to mount all tmpfs within the container as noexec. They were able to get most of it done but "/dev", because it was done down in the runtime spec. I can think of no reason why "/dev", should not be mounted with noexec especially within a container. I know it is not mounted by default in Fedora that way, but I do not know why. Debian looks like it has made the change, and only one bug a couple of years ago showed issues, which would not apply to containers. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940171 Anyways this would make containers "slightly" more secure, and I think it is worth doing. Signed-off-by: Daniel J Walsh <[email protected]>
1 parent 59cdde0 commit 09d837b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generate/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func New(os string) (generator Generator, err error) {
182182
Destination: "/dev",
183183
Type: "tmpfs",
184184
Source: "tmpfs",
185-
Options: []string{"nosuid", "strictatime", "mode=755", "size=65536k"},
185+
Options: []string{"nosuid", "noexec", "strictatime", "mode=755", "size=65536k"},
186186
},
187187
{
188188
Destination: "/dev/pts",

0 commit comments

Comments
 (0)