LZMA on AMD64 had bug in calling sequence, leading to random exit(127)

LzmaDecode randomly decided that the input had ended in the middle,
because of error in interface between ELFMAINX and the decoder.

Thanks to Kevin Gosse!
https://github.com/upx/upx/pull/716
https://github.com/MichalStrehovsky/PublishAotCompressed/issues/11
This commit is contained in:
John Reiser
2023-10-06 14:14:32 -07:00
committed by Markus F.X.J. Oberhumer
parent e32de83758
commit 0515be4334
12 changed files with 1196 additions and 1191 deletions
@@ -46,8 +46,8 @@ b8c35fa2956da17ca505956e9f5017bb5f3a746322647e24ccb8ff28059cafa4 *powerpc-linux.
a0950546dc17fca9437219431d8ddb0249ce5b08e899e0c799a87ac982adee70 *powerpc64le-linux.elf/upx-3.95 a0950546dc17fca9437219431d8ddb0249ce5b08e899e0c799a87ac982adee70 *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\ expected_sha256sums__t110_compress_ucl_nrv2b_3_no_filter="\
9277cffa44f1fe71ed3b3ea5cbeb7c27ae9b125d75c1fc6476e3c624fc34db9e *amd64-linux.elf/upx-3.91 fb458e6e7718ffd3f060fca911d069a024df8da7c75e34a0aea820a15ca03551 *amd64-linux.elf/upx-3.91
e98d3c79e9053a8f39ddfcf741504ba4a42491836149d8481f7291752b43fb6c *amd64-linux.elf/upx-3.95 8988a2556bff2da1a5de9a5a4c909a53ae99a825fcdc7699d4c504bc697f60df *amd64-linux.elf/upx-3.95
b8bf6a29177bc7e9595d1c2a200f2c6431e12eee1ca2c8a64064a52c792b7b65 *amd64-win64.pe/upx-3.95.exe b8bf6a29177bc7e9595d1c2a200f2c6431e12eee1ca2c8a64064a52c792b7b65 *amd64-win64.pe/upx-3.95.exe
02c17f49a54f50a9ed453227b600feb4ba5574514552d1cb344b1b012265afb2 *arm-linux.elf/upx-3.95 02c17f49a54f50a9ed453227b600feb4ba5574514552d1cb344b1b012265afb2 *arm-linux.elf/upx-3.95
0006e29a124430722e691a05afab0a381d332c2ffe53c7f6a2cdf4cdea5349ce *arm-wince.pe/upx-3.91.exe 0006e29a124430722e691a05afab0a381d332c2ffe53c7f6a2cdf4cdea5349ce *arm-wince.pe/upx-3.91.exe
@@ -69,8 +69,8 @@ e1ec8a1d392e0493c9fd60f3327d85aec108815100ab01ae65210cd26c917888 *powerpc-linux.
149efbda7f68c354d48771d838aca07cbdda503746bb83497ec8ab226dea4792 *powerpc64le-linux.elf/upx-3.95 149efbda7f68c354d48771d838aca07cbdda503746bb83497ec8ab226dea4792 *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\ expected_sha256sums__t120_compress_ucl_nrv2d_3_no_filter="\
d422952d3c3cd28dc98e357c6c819b321fa4f06181e56d6380265c2b30ee77b4 *amd64-linux.elf/upx-3.91 3f1d7ad512df7cc6f1fa4fe4a37f21d92709764fc385e307504e12208c090df4 *amd64-linux.elf/upx-3.91
4b4be25be212976fcbf8d4c306a81ab38a58cd98dc351c58d1815005950c9a62 *amd64-linux.elf/upx-3.95 a9291e95bc5c59193ae318c4bf13341ade909b8a6b42694c33cb3a9d1a084637 *amd64-linux.elf/upx-3.95
968c6c681b99c6ad21f3100527da0d2f0ccc510885d6a23b1db613207aedc739 *amd64-win64.pe/upx-3.95.exe 968c6c681b99c6ad21f3100527da0d2f0ccc510885d6a23b1db613207aedc739 *amd64-win64.pe/upx-3.95.exe
e06b57cd0013db94ba298bef4b30d904ad8eadafb7db6b4b4964de65f9fae0ad *arm-linux.elf/upx-3.95 e06b57cd0013db94ba298bef4b30d904ad8eadafb7db6b4b4964de65f9fae0ad *arm-linux.elf/upx-3.95
bf6c7ba2a464f7dfcdff230462a23f9bcfafaebddb7746f0021367076ede58ac *arm-wince.pe/upx-3.91.exe bf6c7ba2a464f7dfcdff230462a23f9bcfafaebddb7746f0021367076ede58ac *arm-wince.pe/upx-3.91.exe
@@ -92,8 +92,8 @@ fd726e5be8f899cea4ce147beb23e7697953220f680b54d9ad12ecbbf6764fd9 *mips-linux.elf
287d53686422057d5c7ddad5c30ad2a3342424153b162f3769fe8fe717b48b91 *powerpc64le-linux.elf/upx-3.95 287d53686422057d5c7ddad5c30ad2a3342424153b162f3769fe8fe717b48b91 *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\ expected_sha256sums__t130_compress_ucl_nrv2e_3_no_filter="\
e25ffc8ae6b9e27d135cf447e1f62a59a1b3428d7fd324931a6686d317369cb8 *amd64-linux.elf/upx-3.91 3f04cc82752ee6c573e6ed22a44943caa1126503ad898def7452e25df14709ec *amd64-linux.elf/upx-3.91
6aa80d470135b7fc98088a7f40ea49b858d6bffd97af0a3e26bc7fa2bb919696 *amd64-linux.elf/upx-3.95 7a3103783fb6c1e34b476e2cbeb7a5992c635dcd643d1ff37e5aeaf57f70f268 *amd64-linux.elf/upx-3.95
509be220b15f12853a26207f8c2fe361feed50203adb3af4e2bb03aab3467221 *amd64-win64.pe/upx-3.95.exe 509be220b15f12853a26207f8c2fe361feed50203adb3af4e2bb03aab3467221 *amd64-win64.pe/upx-3.95.exe
e2e4dfb92a85a1e8d06d2d28778f63c3efec484b91c58236ce9df02cfe3e012e *arm-linux.elf/upx-3.95 e2e4dfb92a85a1e8d06d2d28778f63c3efec484b91c58236ce9df02cfe3e012e *arm-linux.elf/upx-3.95
18bf698a9ea039a0c3f1de9cab845dc1b51ad881e96daba4b7389adca830ecec *arm-wince.pe/upx-3.91.exe 18bf698a9ea039a0c3f1de9cab845dc1b51ad881e96daba4b7389adca830ecec *arm-wince.pe/upx-3.91.exe
@@ -115,8 +115,8 @@ a72cffc63f3415f5c913a504c2d2af30cd533f849cd7866b65a8b4c91301c475 *mipsel-linux.e
9b04dbab6863895dd3df5b0fe50086eff57e401d853a55fd9cdd06c0794e7ce7 *powerpc64le-linux.elf/upx-3.95 9b04dbab6863895dd3df5b0fe50086eff57e401d853a55fd9cdd06c0794e7ce7 *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t140_compress_lzma_2_no_filter="\ expected_sha256sums__t140_compress_lzma_2_no_filter="\
5c25493ee8a75b3b604a01920fe35ad10b96dee13d0e2f9a4e92c6576962f468 *amd64-linux.elf/upx-3.91 68ea7e46654a94a1c125e039b9167ee8724edf0762f5522e81cfbb94005af8fd *amd64-linux.elf/upx-3.91
8e4a46ff5b3e629492b69a522155f48ac8cc7374eb2ce24c974d586e207c5db0 *amd64-linux.elf/upx-3.95 7adf842624efaa46a03b1861fee62dbc01c1e22387b29fa16f530d3c6aa4d295 *amd64-linux.elf/upx-3.95
77aa80d55f83afdfb3796dfbe972b79a2195b37f84e9bb87ff7d11e497927021 *amd64-win64.pe/upx-3.95.exe 77aa80d55f83afdfb3796dfbe972b79a2195b37f84e9bb87ff7d11e497927021 *amd64-win64.pe/upx-3.95.exe
16916c440d76231df63ae5260bcf28c65476d06319d51e084f1730ab83d279bc *arm-linux.elf/upx-3.95 16916c440d76231df63ae5260bcf28c65476d06319d51e084f1730ab83d279bc *arm-linux.elf/upx-3.95
fae27479b40010e1d0794fe28fcc619c64a6ff21888221089fee429135658580 *arm-wince.pe/upx-3.91.exe fae27479b40010e1d0794fe28fcc619c64a6ff21888221089fee429135658580 *arm-wince.pe/upx-3.91.exe
@@ -138,8 +138,8 @@ c1b63b66351e224cc53e33086daafefdeaf3c91a37b68426b08d2c709727f214 *powerpc-linux.
9e28a8e6eb94549defc2a842ca24bc7a7496f581237378a118a0ee1792598ee1 *powerpc64le-linux.elf/upx-3.95 9e28a8e6eb94549defc2a842ca24bc7a7496f581237378a118a0ee1792598ee1 *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t150_compress_ucl_2_all_filters="\ expected_sha256sums__t150_compress_ucl_2_all_filters="\
bec78959277e8065c2a4cdb149be71e3531fd02c744ce20d22dc122a5e6af86b *amd64-linux.elf/upx-3.91 7b164c03af75a33c19dfa45767e9f44a754fd2fecd56239609fff37244030593 *amd64-linux.elf/upx-3.91
53a3c5831dc24d0fb23cffb2df55b1457399ed536b27a081f1d42b3a85161bb3 *amd64-linux.elf/upx-3.95 f591bf4b34d2bdab707506ca9e7b2822b0d9bfa1dfd542b96512fcdfe18c77d3 *amd64-linux.elf/upx-3.95
a80f6756fb9acb5ac4be3f0609c37042922c769a285eca34734eb62547ce4479 *amd64-win64.pe/upx-3.95.exe a80f6756fb9acb5ac4be3f0609c37042922c769a285eca34734eb62547ce4479 *amd64-win64.pe/upx-3.95.exe
2c249c4fd65bc53376984bfbe352d7732f49d7c601dd01773a6034c127a03416 *arm-linux.elf/upx-3.95 2c249c4fd65bc53376984bfbe352d7732f49d7c601dd01773a6034c127a03416 *arm-linux.elf/upx-3.95
f640a43f3e12d092a4a8e9f34d89cc02ca85d382b80e1efdeec4ecffb09aa680 *arm-wince.pe/upx-3.91.exe f640a43f3e12d092a4a8e9f34d89cc02ca85d382b80e1efdeec4ecffb09aa680 *arm-wince.pe/upx-3.91.exe
@@ -161,8 +161,8 @@ b4b3ebd20ee61a0ed47d481e7333cef42d1a23f832c5463aff6df640d5265e65 *powerpc-linux.
0283de59bd2bf8f9dc11e1b5ad69d666bfc7a2b2168585ae3874f758eb271336 *powerpc64le-linux.elf/upx-3.95 0283de59bd2bf8f9dc11e1b5ad69d666bfc7a2b2168585ae3874f758eb271336 *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t160_compress_all_methods_1_no_filter="\ expected_sha256sums__t160_compress_all_methods_1_no_filter="\
08d8675ea98bf72bf20e7d1444d7f98dbfe706ed25e6e9c8d74b83e3faaa584b *amd64-linux.elf/upx-3.91 d2ebb0a3e77b766446b0076008c63e910b3286b72ba7c4cce03782f36c0c7396 *amd64-linux.elf/upx-3.91
8cb8bf5b15d89ab5aecc83a646db9a4280be7f6df431ecfd4904969f4fa74ddc *amd64-linux.elf/upx-3.95 3de94645a9b15b723b21da216e26577f8e28d4d296ceb5b68eacf5ea4040525c *amd64-linux.elf/upx-3.95
4106f280f30fff3c39fe72b10cf450cc514d3aa9e6769255f54606c4c09bf646 *amd64-win64.pe/upx-3.95.exe 4106f280f30fff3c39fe72b10cf450cc514d3aa9e6769255f54606c4c09bf646 *amd64-win64.pe/upx-3.95.exe
db5838a8816241e57f3271ee217cbd99b80d2c5ec15f9c71e0b1da1cced372a3 *arm-linux.elf/upx-3.95 db5838a8816241e57f3271ee217cbd99b80d2c5ec15f9c71e0b1da1cced372a3 *arm-linux.elf/upx-3.95
97a78c7aef6ab3eeb2807893c4edfb529565e36b27f9982456276dde46e34d90 *arm-wince.pe/upx-3.91.exe 97a78c7aef6ab3eeb2807893c4edfb529565e36b27f9982456276dde46e34d90 *arm-wince.pe/upx-3.91.exe
@@ -184,8 +184,8 @@ e875572d1be9999b9292122d2094ae54142b268d7fda4ab12544507aaf673fe3 *mipsel-linux.e
71863da15c4bd482c7ad6123895b555db86610b3cc35e7ab99897d7c9dbfcc9a *powerpc64le-linux.elf/upx-3.95 71863da15c4bd482c7ad6123895b555db86610b3cc35e7ab99897d7c9dbfcc9a *powerpc64le-linux.elf/upx-3.95
" "
expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\ expected_sha256sums__t170_compress_all_methods_no_lzma_5_no_filter="\
554a9bbca1c17a0ea65a03df0769eb0578cbb0d95a16fbd8cb7f2141baa93489 *amd64-linux.elf/upx-3.91 6880572cb1b05e8b43af2cc0a56937ad4dc3fb32260092a1649164155b5e39de *amd64-linux.elf/upx-3.91
2185b03c37b5527234f685033f97445211024f1f057d3e0ad95030ff97593e2e *amd64-linux.elf/upx-3.95 d6133ca17edfc370015f37182f5a6531830cefc688c127dbe0d45a7212838f0f *amd64-linux.elf/upx-3.95
027c3eb340c77f31bbc39bc05fb5ba56c2fc33529c445c288b6af26031172442 *amd64-win64.pe/upx-3.95.exe 027c3eb340c77f31bbc39bc05fb5ba56c2fc33529c445c288b6af26031172442 *amd64-win64.pe/upx-3.95.exe
7b9ef1fd569242b03ca8b4c6dabf880271cb3755cd00c08d15a77dc00bc05f83 *arm-linux.elf/upx-3.95 7b9ef1fd569242b03ca8b4c6dabf880271cb3755cd00c08d15a77dc00bc05f83 *arm-linux.elf/upx-3.95
bbeb21e516bf50e7d35cffb364337c6f157a31ddcacc3d43a2b2dfda8b8da3be *arm-wince.pe/upx-3.91.exe bbeb21e516bf50e7d35cffb364337c6f157a31ddcacc3d43a2b2dfda8b8da3be *arm-wince.pe/upx-3.91.exe
+541 -540
View File
File diff suppressed because it is too large Load Diff
+59 -59
View File
@@ -1,5 +1,5 @@
/* amd64-linux.elf-so_entry.h /* amd64-linux.elf-so_entry.h
created from amd64-linux.elf-so_entry.bin, 970 (0x3ca) bytes created from amd64-linux.elf-so_entry.bin, 974 (0x3ce) bytes
This file is part of the UPX executable compressor. This file is part of the UPX executable compressor.
@@ -31,11 +31,11 @@
*/ */
#define STUB_AMD64_LINUX_ELF_SO_ENTRY_SIZE 970 #define STUB_AMD64_LINUX_ELF_SO_ENTRY_SIZE 974
#define STUB_AMD64_LINUX_ELF_SO_ENTRY_ADLER32 0x06cc0686 #define STUB_AMD64_LINUX_ELF_SO_ENTRY_ADLER32 0xbbc2077c
#define STUB_AMD64_LINUX_ELF_SO_ENTRY_CRC32 0xe28ae3dc #define STUB_AMD64_LINUX_ELF_SO_ENTRY_CRC32 0x8772a7c3
unsigned char stub_amd64_linux_elf_so_entry[970] = { unsigned char stub_amd64_linux_elf_so_entry[974] = {
/* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0000 */ 127, 69, 76, 70, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0010 */ 1, 0, 62, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x0010 */ 1, 0, 62, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0,128, 1, 0, 0, 0, 0, 0, 0, /* 0x0020 */ 0, 0, 0, 0, 0, 0, 0, 0,128, 1, 0, 0, 0, 0, 0, 0,
@@ -43,58 +43,58 @@ unsigned char stub_amd64_linux_elf_so_entry[970] = {
/* 0x0040 */ 144, 82, 86, 87, 83, 85, 72,137,229,232, 0, 0, 0, 0, 1,219, /* 0x0040 */ 144, 82, 86, 87, 83, 85, 72,137,229,232, 0, 0, 0, 0, 1,219,
/* 0x0050 */ 116, 2,243,195,139, 30, 72,131,238,252, 17,219,195, 91, 72,141, /* 0x0050 */ 116, 2,243,195,139, 30, 72,131,238,252, 17,219,195, 91, 72,141,
/* 0x0060 */ 66,226, 80,139, 3, 80, 72, 41,196, 72,131,228,240, 84, 95, 85, /* 0x0060 */ 66,226, 80,139, 3, 80, 72, 41,196, 72,131,228,240, 84, 95, 85,
/* 0x0070 */ 139, 75, 4, 72,141,115, 12, 72, 1,241, 81, 49,219, 49,201,106, /* 0x0070 */ 139, 75, 4, 72,141,115, 12, 72, 1,241, 81, 72, 41,241, 49,219,
/* 0x0080 */ 255, 93,252,168,164,255,210,114,251,141, 65, 1,255,210, 17,192, /* 0x0080 */ 49,201,106,255, 93,252,168,164,255,210,114,251,141, 65, 1,255,
/* 0x0090 */ 255,210,115,248,131,232, 3,114, 12,193,224, 8,172,131,240,255, /* 0x0090 */ 210, 17,192,255,210,115,248,131,232, 3,114, 12,193,224, 8,172,
/* 0x00a0 */ 116, 47, 72, 99,232,141, 65, 1,255,210, 17,201,255,210, 17,201, /* 0x00a0 */ 131,240,255,116, 47, 72, 99,232,141, 65, 1,255,210, 17,201,255,
/* 0x00b0 */ 117, 13,137,193,131,192, 2,255,210, 17,201,255,210,115,248,129, /* 0x00b0 */ 210, 17,201,117, 13,137,193,131,192, 2,255,210, 17,201,255,210,
/* 0x00c0 */ 253, 0,243,255,255, 17,193, 86, 72,141, 52, 47,243,164, 94,235, /* 0x00c0 */ 115,248,129,253, 0,243,255,255, 17,193, 86, 72,141, 52, 47,243,
/* 0x00d0 */ 180, 89, 72, 57,206,116, 1,244, 93,106, 0, 94,232, 4, 0, 0, /* 0x00d0 */ 164, 94,235,180, 89, 72, 57,206,116, 1,244, 93,106, 0, 94,232,
/* 0x00e0 */ 0,117,112,120, 0, 95,104, 63, 1, 0, 0,232, 58, 0, 0, 0, /* 0x00e0 */ 4, 0, 0, 0,117,112,120, 0, 95,104, 63, 1, 0, 0,232, 58,
/* 0x00f0 */ 80, 95, 84, 94, 80, 72,139, 85,240,106, 1,232, 42, 0, 0, 0, /* 0x00f0 */ 0, 0, 0, 80, 95, 84, 94, 80, 72,139, 85,240,106, 1,232, 42,
/* 0x0100 */ 65, 88, 72,141,101,240, 94, 86, 69, 41,201,106, 2, 65, 90,106, /* 0x0100 */ 0, 0, 0, 65, 88, 72,141,101,240, 94, 86, 69, 41,201,106, 2,
/* 0x0110 */ 5, 90, 41,255,106, 9,232, 15, 0, 0, 0, 80, 65, 80, 95,106, /* 0x0110 */ 65, 90,106, 5, 90, 41,255,106, 9,232, 15, 0, 0, 0, 80, 65,
/* 0x0120 */ 3,232, 4, 0, 0, 0, 88, 80,255,224, 72,139, 68, 36, 8, 15, /* 0x0120 */ 80, 95,106, 3,232, 4, 0, 0, 0, 88, 80,255,224, 72,139, 68,
/* 0x0130 */ 5, 72, 61, 0,240,255,255,114, 1,204,194, 8, 0, 90,232, 0, /* 0x0130 */ 36, 8, 15, 5, 72, 61, 0,240,255,255,114, 1,204,194, 8, 0,
/* 0x0140 */ 0, 0, 0,102,105,108,101, 32,102,111,114,109, 97,116, 32,101, /* 0x0140 */ 90,232, 0, 0, 0, 0,102,105,108,101, 32,102,111,114,109, 97,
/* 0x0150 */ 108,102, 54, 52, 45,120, 56, 54, 45, 54, 52, 10, 10, 83,101, 99, /* 0x0150 */ 116, 32,101,108,102, 54, 52, 45,120, 56, 54, 45, 54, 52, 10, 10,
/* 0x0160 */ 116,105,111,110,115, 58, 10, 73,100,120, 32, 78, 97,109,101, 32, /* 0x0160 */ 83,101, 99,116,105,111,110,115, 58, 10, 73,100,120, 32, 78, 97,
/* 0x0170 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 83,105,122,101, 32, 32, 32, /* 0x0170 */ 109,101, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 83,105,122,101,
/* 0x0180 */ 32, 32, 32, 86, 77, 65, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, /* 0x0180 */ 32, 32, 32, 32, 32, 32, 86, 77, 65, 32, 32, 32, 32, 32, 32, 32,
/* 0x0190 */ 32, 32, 32, 32, 32, 76, 77, 65, 32, 32, 32, 32, 32, 32, 32, 32, /* 0x0190 */ 32, 32, 32, 32, 32, 32, 32, 32, 76, 77, 65, 32, 32, 32, 32, 32,
/* 0x01a0 */ 32, 32, 32, 32, 32, 32, 32, 70,105,108,101, 32,111,102,102, 32, /* 0x01a0 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 70,105,108,101, 32,111,
/* 0x01b0 */ 32, 65,108,103,110, 32, 32, 70,108, 97,103,115, 10, 32, 32, 48, /* 0x01b0 */ 102,102, 32, 32, 65,108,103,110, 32, 32, 70,108, 97,103,115, 10,
/* 0x01c0 */ 32, 69, 76, 70, 77, 65, 73, 78, 88, 32, 32, 32, 32, 32, 32, 48, /* 0x01c0 */ 32, 32, 48, 32, 69, 76, 70, 77, 65, 73, 78, 88, 32, 32, 32, 32,
/* 0x01d0 */ 102,100, 32, 32, 48, 32, 32, 48, 32, 32, 48, 52, 48, 32, 32, 50, /* 0x01d0 */ 32, 32, 48, 49, 48, 48, 32, 32, 48, 32, 32, 48, 32, 32, 48, 52,
/* 0x01e0 */ 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78, 84, 83, 10, 32, 32, /* 0x01e0 */ 48, 32, 32, 50, 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78, 84,
/* 0x01f0 */ 49, 32, 69, 76, 70, 77, 65, 73, 78, 90, 32, 32, 32, 32, 32, 32, /* 0x01f0 */ 83, 10, 32, 32, 49, 32, 69, 76, 70, 77, 65, 73, 78, 90, 32, 32,
/* 0x0200 */ 48, 54, 32, 32, 48, 32, 32, 48, 32, 32, 48, 49, 51,100, 32, 32, /* 0x0200 */ 32, 32, 32, 32, 48, 54, 32, 32, 48, 32, 32, 48, 32, 32, 48, 49,
/* 0x0210 */ 50, 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78, 84, 83, 10, 83, /* 0x0210 */ 52, 48, 32, 32, 50, 42, 42, 48, 32, 32, 67, 79, 78, 84, 69, 78,
/* 0x0220 */ 89, 77, 66, 79, 76, 32, 84, 65, 66, 76, 69, 58, 10, 48, 48, 48, /* 0x0220 */ 84, 83, 10, 83, 89, 77, 66, 79, 76, 32, 84, 65, 66, 76, 69, 58,
/* 0x0230 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 32,108, 32, /* 0x0230 */ 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x0240 */ 32, 32, 32,100, 32, 32, 69, 76, 70, 77, 65, 73, 78, 88, 32, 48, /* 0x0240 */ 48, 32,108, 32, 32, 32, 32,100, 32, 32, 69, 76, 70, 77, 65, 73,
/* 0x0250 */ 32, 69, 76, 70, 77, 65, 73, 78, 88, 10, 48, 48, 48, 48, 48, 48, /* 0x0250 */ 78, 88, 32, 48, 32, 69, 76, 70, 77, 65, 73, 78, 88, 10, 48, 48,
/* 0x0260 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 32,108, 32, 32, 32, 32, /* 0x0260 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 32,108,
/* 0x0270 */ 32, 32, 32, 69, 76, 70, 77, 65, 73, 78, 88, 32, 48, 32, 95,115, /* 0x0270 */ 32, 32, 32, 32, 32, 32, 32, 69, 76, 70, 77, 65, 73, 78, 88, 32,
/* 0x0280 */ 116, 97,114,116, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, /* 0x0280 */ 48, 32, 95,115,116, 97,114,116, 10, 48, 48, 48, 48, 48, 48, 48,
/* 0x0290 */ 48, 48, 48, 48, 48, 32,108, 32, 32, 32, 32,100, 32, 32, 69, 76, /* 0x0290 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 32,108, 32, 32, 32, 32,100,
/* 0x02a0 */ 70, 77, 65, 73, 78, 90, 32, 48, 32, 69, 76, 70, 77, 65, 73, 78, /* 0x02a0 */ 32, 32, 69, 76, 70, 77, 65, 73, 78, 90, 32, 48, 32, 69, 76, 70,
/* 0x02b0 */ 90, 10, 10, 82, 69, 76, 79, 67, 65, 84, 73, 79, 78, 32, 82, 69, /* 0x02b0 */ 77, 65, 73, 78, 90, 10, 10, 82, 69, 76, 79, 67, 65, 84, 73, 79,
/* 0x02c0 */ 67, 79, 82, 68, 83, 32, 70, 79, 82, 32, 91, 69, 76, 70, 77, 65, /* 0x02c0 */ 78, 32, 82, 69, 67, 79, 82, 68, 83, 32, 70, 79, 82, 32, 91, 69,
/* 0x02d0 */ 73, 78, 88, 93, 58, 10, 79, 70, 70, 83, 69, 84, 32, 32, 32, 32, /* 0x02d0 */ 76, 70, 77, 65, 73, 78, 88, 93, 58, 10, 79, 70, 70, 83, 69, 84,
/* 0x02e0 */ 32, 32, 32, 32, 32, 32, 32, 84, 89, 80, 69, 32, 32, 32, 32, 32, /* 0x02e0 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 84, 89, 80, 69, 32,
/* 0x02f0 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 10, 48, /* 0x02f0 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76,
/* 0x0300 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 97, 32, /* 0x0300 */ 85, 69, 10, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
/* 0x0310 */ 82, 95, 88, 56, 54, 95, 54, 52, 95, 80, 67, 51, 50, 32, 32, 32, /* 0x0310 */ 48, 48, 97, 32, 82, 95, 88, 56, 54, 95, 54, 52, 95, 80, 67, 51,
/* 0x0320 */ 32, 32, 69, 76, 70, 77, 65, 73, 78, 90, 43, 48,120,102,102,102, /* 0x0320 */ 50, 32, 32, 32, 32, 32, 69, 76, 70, 77, 65, 73, 78, 90, 43, 48,
/* 0x0330 */ 102,102,102,102,102,102,102,102,102,102,102,102, 99, 10, 10, 82, /* 0x0330 */ 120,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,
/* 0x0340 */ 69, 76, 79, 67, 65, 84, 73, 79, 78, 32, 82, 69, 67, 79, 82, 68, /* 0x0340 */ 99, 10, 10, 82, 69, 76, 79, 67, 65, 84, 73, 79, 78, 32, 82, 69,
/* 0x0350 */ 83, 32, 70, 79, 82, 32, 91, 69, 76, 70, 77, 65, 73, 78, 90, 93, /* 0x0350 */ 67, 79, 82, 68, 83, 32, 70, 79, 82, 32, 91, 69, 76, 70, 77, 65,
/* 0x0360 */ 58, 10, 79, 70, 70, 83, 69, 84, 32, 32, 32, 32, 32, 32, 32, 32, /* 0x0360 */ 73, 78, 90, 93, 58, 10, 79, 70, 70, 83, 69, 84, 32, 32, 32, 32,
/* 0x0370 */ 32, 32, 32, 84, 89, 80, 69, 32, 32, 32, 32, 32, 32, 32, 32, 32, /* 0x0370 */ 32, 32, 32, 32, 32, 32, 32, 84, 89, 80, 69, 32, 32, 32, 32, 32,
/* 0x0380 */ 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 10, 48, 48, 48, 48, 48, /* 0x0380 */ 32, 32, 32, 32, 32, 32, 32, 32, 32, 86, 65, 76, 85, 69, 10, 48,
/* 0x0390 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 32, 82, 95, 88, 56, /* 0x0390 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 50, 32,
/* 0x03a0 */ 54, 95, 54, 52, 95, 80, 67, 51, 50, 32, 32, 32, 32, 32, 69, 76, /* 0x03a0 */ 82, 95, 88, 56, 54, 95, 54, 52, 95, 80, 67, 51, 50, 32, 32, 32,
/* 0x03b0 */ 70, 77, 65, 73, 78, 88, 43, 48,120, 48, 48, 48, 48, 48, 48, 48, /* 0x03b0 */ 32, 32, 69, 76, 70, 77, 65, 73, 78, 88, 43, 48,120, 48, 48, 48,
/* 0x03c0 */ 48, 48, 48, 48, 48, 48, 48, 49, 57, 10 /* 0x03c0 */ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 57, 10
}; };
+547 -547
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -92,6 +92,7 @@ decompress: // (uchar const *src, size_t lsrc, uchar *dst, u32 &ldst, uint meth
push ldst push ldst
push dst push dst
addq src,lsrc; push lsrc // &input_eof addq src,lsrc; push lsrc // &input_eof
subq src,lsrc // restore the value of lsrc
section NRV_HEAD section NRV_HEAD
+5 -5
View File
@@ -232,7 +232,7 @@ make_hatch_x86_64(
{ {
unsigned xprot = 0; unsigned xprot = 0;
unsigned *hatch = 0; unsigned *hatch = 0;
DPRINTF("make_hatch %%p %%x %%x %%x\\n",phdr,reloc,frag_mask, phdr->p_flags); DPRINTF("make_hatch %%p %%p %%x %%x\\n",phdr,reloc,frag_mask, phdr->p_flags);
if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) { if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) {
if ( if (
// Try page fragmentation just beyond .text . // Try page fragmentation just beyond .text .
@@ -275,7 +275,7 @@ make_hatch_ppc64(
{ {
unsigned xprot = 0; unsigned xprot = 0;
unsigned *hatch = 0; unsigned *hatch = 0;
DPRINTF("make_hatch %%p %%x %%x\\n",phdr,reloc,frag_mask); DPRINTF("make_hatch %%p %%p %%x\\n",phdr,reloc,frag_mask);
if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) { if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) {
if ( if (
// Try page fragmentation just beyond .text . // Try page fragmentation just beyond .text .
@@ -315,7 +315,7 @@ make_hatch_arm64(
{ {
unsigned xprot = 0; unsigned xprot = 0;
unsigned *hatch = 0; unsigned *hatch = 0;
DPRINTF("make_hatch %%p %%x %%x\\n",phdr,reloc,frag_mask); DPRINTF("make_hatch %%p %%p %%x\\n",phdr,reloc,frag_mask);
if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) { if (phdr->p_type==PT_LOAD && phdr->p_flags & PF_X) {
// The format of the 'if' is // The format of the 'if' is
// if ( ( (hatch = loc1), test_loc1 ) // if ( ( (hatch = loc1), test_loc1 )
@@ -522,8 +522,8 @@ do_xmap(
DPRINTF(" mlen=%%p\\n", mlen); DPRINTF(" mlen=%%p\\n", mlen);
#endif #endif
DPRINTF("mmap addr=%%p mlen=%%p offset=%%p lo_frag=%%p prot=%%x\\n", DPRINTF("mmap addr=%%p mlen=%%p offset=%%p lo_frag=%%p prot=%%x reloc=%%p\\n",
addr, mlen, phdr->p_offset - lo_frag, lo_frag, prot); addr, mlen, phdr->p_offset - lo_frag, lo_frag, prot, reloc);
if (addr != mmap(addr, mlen, if (addr != mmap(addr, mlen,
// If compressed, then we need PROT_WRITE to de-compress; // If compressed, then we need PROT_WRITE to de-compress;
// but then SELinux 'execmod' requires no PROT_EXEC for now. // but then SELinux 'execmod' requires no PROT_EXEC for now.
+1
View File
@@ -142,6 +142,7 @@ L20: // %rdx == &getbit
lea sz_b_info(%rbx),src lea sz_b_info(%rbx),src
decompress: // inlined: (uchar const *src, uint len, uchar *dst /*, u32 &ldst, uint method */) decompress: // inlined: (uchar const *src, uint len, uchar *dst /*, u32 &ldst, uint method */)
addq src,lsrc; push lsrc // MATCH_05 &input_eof addq src,lsrc; push lsrc // MATCH_05 &input_eof
subq src,lsrc //restore the value of lsrc
//%rsp: //%rsp:
// MATCH_05 &input_eof // MATCH_05 &input_eof
+1
View File
@@ -101,6 +101,7 @@ decompress: // (uchar const *src, size_t lsrc, uchar *dst, u32 &ldst, uint meth
push ldst push ldst
push dst push dst
addq src,lsrc; push lsrc // &input_eof addq src,lsrc; push lsrc // &input_eof
subq src,lsrc // restore the value of lsrc
section NRV_HEAD section NRV_HEAD
+1
View File
@@ -44,6 +44,7 @@ section LZMA_ELF00
// pushq ldst // pushq ldst
// pushq dst // pushq dst
// addq src,lsrc; push lsrc // &input_eof // addq src,lsrc; push lsrc // &input_eof
// subq src,lsrc //restore the value of lsrc
#define M_LZMA 14 #define M_LZMA 14
#ifndef NO_METHOD_CHECK #ifndef NO_METHOD_CHECK
+12 -12
View File
@@ -2,18 +2,18 @@ file format elf64-x86-64
Sections: Sections:
Idx Name Size VMA LMA File off Algn Flags Idx Name Size VMA LMA File off Algn Flags
0 ELFMAINX 0f 0 0 040 2**0 CONTENTS 0 ELFMAINX 012 0 0 040 2**0 CONTENTS
1 NRV_HEAD 066 0 0 04f 2**0 CONTENTS 1 NRV_HEAD 066 0 0 052 2**0 CONTENTS
2 NRV2E 0ba 0 0 0b5 2**0 CONTENTS 2 NRV2E 0ba 0 0 0b8 2**0 CONTENTS
3 NRV2D 0a1 0 0 016f 2**0 CONTENTS 3 NRV2D 0a1 0 0 0172 2**0 CONTENTS
4 NRV2B 093 0 0 0210 2**0 CONTENTS 4 NRV2B 093 0 0 0213 2**0 CONTENTS
5 LZMA_ELF00 064 0 0 02a3 2**0 CONTENTS 5 LZMA_ELF00 064 0 0 02a6 2**0 CONTENTS
6 LZMA_DEC10 09f7 0 0 0307 2**0 CONTENTS 6 LZMA_DEC10 09f7 0 0 030a 2**0 CONTENTS
7 LZMA_DEC20 09f7 0 0 0cfe 2**0 CONTENTS 7 LZMA_DEC20 09f7 0 0 0d01 2**0 CONTENTS
8 LZMA_DEC30 018 0 0 016f5 2**0 CONTENTS 8 LZMA_DEC30 018 0 0 016f8 2**0 CONTENTS
9 NRV_TAIL 0 0 0 0170d 2**0 CONTENTS 9 NRV_TAIL 0 0 0 01710 2**0 CONTENTS
10 ELFMAINY 03a 0 0 0170d 2**0 CONTENTS 10 ELFMAINY 03a 0 0 01710 2**0 CONTENTS
11 ELFMAINZ 0b1 0 0 01747 2**0 CONTENTS 11 ELFMAINZ 0b1 0 0 0174a 2**0 CONTENTS
SYMBOL TABLE: SYMBOL TABLE:
0000000000000000 l d NRV_HEAD 0 NRV_HEAD 0000000000000000 l d NRV_HEAD 0 NRV_HEAD
0000000000000000 l d LZMA_DEC30 0 LZMA_DEC30 0000000000000000 l d LZMA_DEC30 0 LZMA_DEC30
+2 -2
View File
@@ -2,8 +2,8 @@ file format elf64-x86-64
Sections: Sections:
Idx Name Size VMA LMA File off Algn Flags Idx Name Size VMA LMA File off Algn Flags
0 ELFMAINX 0fd 0 0 040 2**0 CONTENTS 0 ELFMAINX 0100 0 0 040 2**0 CONTENTS
1 ELFMAINZ 06 0 0 013d 2**0 CONTENTS 1 ELFMAINZ 06 0 0 0140 2**0 CONTENTS
SYMBOL TABLE: SYMBOL TABLE:
0000000000000000 l d ELFMAINX 0 ELFMAINX 0000000000000000 l d ELFMAINX 0 ELFMAINX
0000000000000000 l ELFMAINX 0 _start 0000000000000000 l ELFMAINX 0 _start
+12 -12
View File
@@ -2,18 +2,18 @@ file format elf64-x86-64
Sections: Sections:
Idx Name Size VMA LMA File off Algn Flags Idx Name Size VMA LMA File off Algn Flags
0 ELFMAINX 019 0 0 040 2**0 CONTENTS 0 ELFMAINX 01c 0 0 040 2**0 CONTENTS
1 NRV_HEAD 066 0 0 059 2**0 CONTENTS 1 NRV_HEAD 066 0 0 05c 2**0 CONTENTS
2 NRV2E 0ba 0 0 0bf 2**0 CONTENTS 2 NRV2E 0ba 0 0 0c2 2**0 CONTENTS
3 NRV2D 0a1 0 0 0179 2**0 CONTENTS 3 NRV2D 0a1 0 0 017c 2**0 CONTENTS
4 NRV2B 093 0 0 021a 2**0 CONTENTS 4 NRV2B 093 0 0 021d 2**0 CONTENTS
5 LZMA_ELF00 064 0 0 02ad 2**0 CONTENTS 5 LZMA_ELF00 064 0 0 02b0 2**0 CONTENTS
6 LZMA_DEC10 09f7 0 0 0311 2**0 CONTENTS 6 LZMA_DEC10 09f7 0 0 0314 2**0 CONTENTS
7 LZMA_DEC20 09f7 0 0 0d08 2**0 CONTENTS 7 LZMA_DEC20 09f7 0 0 0d0b 2**0 CONTENTS
8 LZMA_DEC30 018 0 0 016ff 2**0 CONTENTS 8 LZMA_DEC30 018 0 0 01702 2**0 CONTENTS
9 NRV_TAIL 0 0 0 01717 2**0 CONTENTS 9 NRV_TAIL 0 0 0 0171a 2**0 CONTENTS
10 ELFMAINY 03a 0 0 01717 2**0 CONTENTS 10 ELFMAINY 03a 0 0 0171a 2**0 CONTENTS
11 ELFMAINZ 01b5 0 0 01751 2**0 CONTENTS 11 ELFMAINZ 01b5 0 0 01754 2**0 CONTENTS
SYMBOL TABLE: SYMBOL TABLE:
0000000000000000 l d NRV_HEAD 0 NRV_HEAD 0000000000000000 l d NRV_HEAD 0 NRV_HEAD
0000000000000000 l d LZMA_DEC30 0 LZMA_DEC30 0000000000000000 l d LZMA_DEC30 0 LZMA_DEC30