4

Is it safe to add noexec mount option while mounting devtmpfs on /dev? I am asking this because in my ubuntu machine the default option is rw,nosuid,realtime (found using cat /proc/mounts | grep /dev). Is there any reason for not adding noexec by default?

1 Answers1

5

No.

There are still programs such as /sbin/v86d around, even now, that memory-map /dev/zero with PROT_EXEC, for no good reason.

Further reading

JdeBP
  • 68,745