Why replacing running executable file is forbidden, but overwriting of memory mapped shared object is allowed ?

Lev Olshvang levonshe at yandex.com
Fri Nov 10 08:30:17 EST 2017


Hi list

The reason for my question is mainly security context.

Here the story
If you ever tried to replace executable file by new image the message  executable is busy appeared and operation fails.

But the attempt to replace shared object library succeeded, and I do not understand the logic of this decision.

Besides to be security hole, I do not see any legitimate use except of live patching of shared object.
I do not know whether production or mission critical system may take a risk of live patching, but development system
would do a library update by stopping dependent application first.

I saw in kernel archives that some years ago the decision was made to withdraw restriction on shared object live replacement
and I would like to know the what what were the reasons because I want to patch my kernel to forbid shared objects live replacement. ( as I said I worry about security issue)

Regards,
Lev




More information about the Kernelnewbies mailing list