Skip to contentSkip to conversation

Security question: "Text file busy" overwriting executables but not shared libraries?

DISCUSSION Rob Landley 2 participants 2 messages Oct 3, 2001

lore
Share & tools
lore
#0 lore raw

Anybody want to venture an opinion why overwriting executable files that are currently in use gives you a "text file busy" error, but overwriting shared libraries that are in use apparently works just fine (modulo a core dump if you aren't subtle about your run-time patching)?

Permissions are still enforced, but it seems to me somebody who cracks root on a system could potentially modify the behavior of important system daemons without changing their process ID numbers.

Did I miss something somewhere?

Rob

#1 lore raw
Quoted 10 lines · Rob Landley

Anybody want to venture an opinion why overwriting executable files that are currently in use gives you a "text file busy" error, but overwriting shared libraries that are in use apparently works just fine (modulo a core dump if you aren't subtle about your run-time patching)?

Permissions are still enforced, but it seems to me somebody who cracks root on a system could potentially modify the behavior of important system daemons without changing their process ID numbers.

Did I miss something somewhere?

Somebody who cracks root can attach gdb to a daemon, modify the contents of its text segment and detach. No need to change any files...