3

I just understand somewhat about what's the purpose of shared memory which is for faster exchange or use of data among several programs. But having seen a lot of people trying to or talking about secure it, I dont understand how it could be dangerous & what could be done to secure it ?

I am asking this in context of configuring a server environment on a VPS.

2 Answers 2

3

It can be dangerous if the program creating it is written wrong and sets up the permissions so that other users can attach to it. You secure it by writing the program properly to restrict the permissions to only that user. As such this isn't an administration problem.

0

"It can be dangerous if the program creating it is written wrong"<.

Or by a exploiter trying to inject code into a running proc (program) on the server that has been established and has been deployed on the server; and that has elevated (possible) privileges; thereby inheriting those privileges, which sets up a possible api for the attacker.

Sorry for the 5 years after. I'm in the process of deploying a server. This shared memory issue has been well documented

By default, /run/shm is mounted read/write, with permission to execute programs. In recent years, many security mailing lists have noted many exploits where /run/shm is used in an attack against a running service, such as httpd. Most of these exploits, however, rely on an insecure web application rather than a vulnerability in Apache or Ubuntu< from help.ubuntu.com

But yes as psusi related, coders can write code that does not allow shared memory. But do they, something as important as a server needs to be at least 99% bullet proof.

Linux, own it or someone will own it and you. Google is your friend

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .