c
chatr(1) | chatr(1) |
SHMEM_MAGIC : normal SHMEM_MAGIC executable
The linker produces SHARE_MAGIC executables by default.
Using SHMEM_MAGIC
SHMEM_MAGIC is an interim solution until
SHMEM_MAGIC will not be supported on future HP implementations of
Programs that are compiled as
The additional 1 GB of shared memory that is available over other types of executables can be availed of only for system V shared memory and not other forms of shared memory (like memory mapped ®les).
Restricting Execute Permission on Stacks
A frequent or common method of breaking into systems is by maliciously over¯owing buffers on a program's stack, such as passing unusually long, carefully chosen command line arguments to a privileged program that does not expect them. Malicious unprivileged users can use this technique to trick a privileged program into starting a superuser shell for them, or to perform similar unauthorized actions.
One simple yet highly effective way to reduce the risk from this type of attack is to remove the execute permission from a program's stack pages. This improves system security without sacri®cing performance and has no negative effects on the vast majority of legitimate applications. The changes described in this section only affect the very small number of programs that try to execute (or are tricked into executing) instructions located on the program's stack(s).
If the stack protection feature described in this section is enabled for a program and that program attempts to execute code from its stack(s), the
WARNING: UID # may have attempted a buffer overflow attack. PID # (program_name) has been terminated. See the '+es enable' option of chatr(1).
If you see one of these messages, check with the program's owner to determine whether this program is legitimately executing code from its stack. If it is, you can use one or both of the methods described below to make the program functional again. If the program is not legitimately executing code from its stack, you should suspect malicious activity and take appropriate action.
The ®rst method is the use of the +es option of chatr and affects individual programs. It is typically used to specify that a particular binary must be able to execute from its stack, regardless of the system default setting. This allows a restrictive system default while not preventing legitimate programs from executing code on their stack(s). Ideally this option should be set (if needed) by the program's provider, to minimize the need for manual intervention by whomever installs the program.
An alternate method is setting the kernel tunable parameter, executable_stack, to set a
Combinations of these settings may be appropriate for many applications. For example, after setting executable_stack to 0, you may ®nd that one or two critical applications no longer work because they have a legitimate need to execute from their stack(s). Programs such as simulators or interpreters that use
Section 1−76 | − 4 − |