Change class PackLinuxI386elf : public PackLinuxI386

into   class PackLinuxElf32x86 : public PackLinuxElf32Le : public PackLinuxElf32
which makes the code for compressing ELF (for direct-to-memory decompression)
cleaner because ELF has some of the class tree to itself.
This assumes PROT_EXEC|PROT_WRITE ought to work.
This is checked at runtime, and if it fails then
give a message on stderr and exit(127).

Modify --force-execve so that runtime avoids PROT_EXEC|PROT_WRITE.
Then executables compressed with --force-execve will run under
PaX, grSecurity, and strict SELinux.
This commit is contained in:
John Reiser
2006-05-21 13:58:24 -07:00
parent 69a00c0ab3
commit d2718e99a4
26 changed files with 1049 additions and 969 deletions
+9 -9
View File
@@ -28,19 +28,19 @@
#define LINUX_I386EXEC_FOLD_SIZE 899
#define LINUX_I386EXEC_FOLD_ADLER32 0xcf9c7496
#define LINUX_I386EXEC_FOLD_CRC32 0xab6154cb
#define LINUX_I386EXEC_FOLD_ADLER32 0x1a1874e1
#define LINUX_I386EXEC_FOLD_CRC32 0x6ce5306c
unsigned char linux_i386exec_fold[899] = {
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
2, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, /* 0x 10 */
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 1, 0, 0, 0, /* 0x 20 */
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16, 64, 0, /* 0x 30 */
0, 16, 64, 0,131, 3, 0, 0,132, 3, 0, 0, 7, 0, 0, 0, /* 0x 40 */
0, 16, 64, 0,131, 3, 0, 0,132, 3, 0, 0, 5, 0, 0, 0, /* 0x 40 */
0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 50 */
88, 88, 88,137,225,141, 84,132, 4,139,123, 24,141,115, 96, 41, /* 0x 60 */
247,141, 93, 2, 96,232,197, 0, 0, 0,244, 83,141, 92, 36, 8, /* 0x 70 */
106, 90, 88,205,128, 91,195, 0, 83,137,195,139, 76, 36, 8,136, /* 0x 80 */
88,137,225,141, 84,132, 4,139,123, 24,141,115, 96, 41,247,141, /* 0x 60 */
93, 2, 96,232,199, 0, 0, 0,244, 83,141, 92, 36, 8,106, 90, /* 0x 70 */
88,205,128, 91,195, 0, 0, 0, 83,137,195,139, 76, 36, 8,136, /* 0x 80 */
208,131,224, 31, 60, 25,118, 3,131,232, 43,131,192, 65, 75,136, /* 0x 90 */
3,137,208,193,232, 5,137,194,226,229, 91,195, 85, 49,201,137, /* 0x a0 */
229, 87, 86,137,202, 83,131,236, 44,139, 93, 8,106, 5, 88,205, /* 0x b0 */
@@ -64,11 +64,11 @@ unsigned char linux_i386exec_fold[899] = {
133,192, 15,133, 2, 1, 0, 0,185,194, 0, 0, 0,186,192, 1, /* 0x 1d0 */
0, 0,141, 93,196,106, 5, 88,205,128,139, 85,232,137, 69,148, /* 0x 1e0 */
137,195,137,209,106, 93, 88,205,128,133,192, 15,133,209, 0, 0, /* 0x 1f0 */
0,106, 0,255,117,148,106, 1,106, 3, 82,106, 0,232,105,254, /* 0x 200 */
0,106, 0,255,117,148,106, 1,106, 3, 82,106, 0,232,103,254, /* 0x 200 */
255,255,131,196, 24, 61, 0,240,255,255,137, 69,136, 15,135,175, /* 0x 210 */
0, 0, 0,139, 69,232,106, 0,106, 0, 5,255, 15, 0, 0,106, /* 0x 220 */
0, 0, 0,139, 69,232,106, 0,106,255, 5,255, 15, 0, 0,106, /* 0x 220 */
50, 37, 0,240,255,255,106, 3, 3, 69,136,104, 0, 16, 0, 0, /* 0x 230 */
80,232, 53,254,255,255,131,196, 24,141,125,180,139,117, 12,165, /* 0x 240 */
80,232, 51,254,255,255,131,196, 24,141,125,180,139,117, 12,165, /* 0x 240 */
165,165,139, 77,180,131,109, 8, 12,133,201,137,117, 12,139, 85, /* 0x 250 */
184,117, 16,129,250, 85, 80, 88, 33,117,103,131,125,232, 0,116, /* 0x 260 */
115,235, 95, 57,202,119, 91, 59, 85,236,119, 86, 57,202,115, 36, /* 0x 270 */