how can we make /dev/shmem non executable, so that any excutable code cannot run in this address space?

0

Hey I want to make qnx more secure so that I want to make /tmp (symbolic link to /dev/shmem) directory non executable. It is to make sure that if any file is copied in /tmp directory with a code written in it, it becomes non executable so that no one can execute that code.

gaurav singh

Posted 2019-09-24T05:02:06.263

Reputation: 1

1How is your /dev/shmem mounted? I guess in OpenBSD it may be via /etc/fstab. Is there a relevant entry in your fstab? ([edit] the question and post the entry). Maybe the solution is just to add noexec in the right place. – Kamil Maciorowski – 2019-09-24T05:50:45.627

cant really figure out how the /dev/shmem is mounted in the qnx. It is definetly not in the file /etc/fstab as this file doesnot exxists – gaurav singh – 2019-09-26T06:03:27.917

Maybe it will be enough if you mount -o remount,noexec /dev/shmem after it's originally mounted. Inelegant, yet it may work. – Kamil Maciorowski – 2019-09-26T06:08:15.127

No answers