Mock Version: 1.3.4 Mock Version: 1.3.4 ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target i686 --nodeps /builddir/build/SPECS/hardening-wrapper.spec'], chrootPath='/var/lib/mock/f24-build-8831651-760923/root'gid=425printOutput=Falsenspawn_args=[]timeout=172800logger=user='mockbuild'shell=Falseenv={'TERM': 'vt100', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'HOME': '/builddir', 'LANG': 'en_US.UTF-8', 'PS1': ' \\s-\\v\\$ ', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'SHELL': '/bin/bash'}uid=1000) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target i686 --nodeps /builddir/build/SPECS/hardening-wrapper.spec'] with env {'TERM': 'vt100', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'HOME': '/builddir', 'LANG': 'en_US.UTF-8', 'PS1': ' \\s-\\v\\$ ', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'SHELL': '/bin/bash'} and shell False Building target platforms: i686 Building for target i686 Wrote: /builddir/build/SRPMS/hardening-wrapper-2.6-1.fc24.src.rpm Child return code was: 0 ENTER ['do'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target i686 --nodeps /builddir/build/SPECS/hardening-wrapper.spec'], chrootPath='/var/lib/mock/f24-build-8831651-760923/root'gid=425printOutput=Falsenspawn_args=[]timeout=172800logger=user='mockbuild'shell=Falseenv={'TERM': 'vt100', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'HOME': '/builddir', 'LANG': 'en_US.UTF-8', 'PS1': ' \\s-\\v\\$ ', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'SHELL': '/bin/bash'}uid=1000) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target i686 --nodeps /builddir/build/SPECS/hardening-wrapper.spec'] with env {'TERM': 'vt100', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'HOME': '/builddir', 'LANG': 'en_US.UTF-8', 'PS1': ' \\s-\\v\\$ ', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'SHELL': '/bin/bash'} and shell False Building target platforms: i686 Building for target i686 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.e3SAML + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf hardening-wrapper-2.6 + /usr/bin/mkdir -p hardening-wrapper-2.6 + cd hardening-wrapper-2.6 + /usr/bin/xz -dc /builddir/build/SOURCES/hardening-wrapper_2.6.tar.xz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/bin/sed -i.debian -e '/^[ \t]*if \[ -z \"\$.DEB_/d' hardening-wrapper/Makefile + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.FPYLZ2 + umask 022 + cd /builddir/build/BUILD + cd hardening-wrapper-2.6 + /usr/bin/make -O -j6 -C hardening-wrapper make: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper' mkdir -p build-tree # Construct wrappers. install hardened-cc hardened-ld build-tree/ # Set defaults, based on OS and ARCH. perl -pi -e 's/ #OS#/ '""'/; s/ #ARCH#/ '""'/;' build-tree/hardened-cc build-tree/hardened-ld perl -pi -e "s/default{'DEB_BUILD_HARDENING_PIE'}=1;/default{'DEB_BUILD_HARDENING_PIE'}=0;/;" build-tree/hardened-cc build-tree/hardened-ld perl -pi -e "s/default{'DEB_BUILD_HARDENING_STACKPROTECTOR'}=1;/default{'DEB_BUILD_HARDENING_STACKPROTECTOR'}=1;/;" build-tree/hardened-cc build-tree/hardened-ld # Duplicate cc wrapper to c++. install build-tree/hardened-cc build-tree/hardened-c++ perl -pi -e 's/hardened-cc/hardened-c++/g; s|/usr/bin/cc|/usr/bin/c++|g;' build-tree/hardened-c++ # Construct tools. install hardening.make hardening-check build-tree/ # Do not use "shell" here because it eats newlines. We want those. perl -pi -e "s/^my %libc;/my %libc = (\n$(perl hardening-check --find-libc-functions /bin/ls)\n);/;" build-tree/hardening-check # Construct man pages. install hardened-cc.1 hardened-ld.1 build-tree/ pod2man hardening-check > build-tree/hardening-check.1 # Duplicate cc man page to c++. install build-tree/hardened-cc.1 build-tree/hardened-c++.1 perl -pi -e 's/hardened-cc/hardened-c++/g; s/gcc/g++/g;' build-tree/hardened-c++.1 touch build-tree/stamp-build make: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper' Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/default{ <-- HERE 'DEB_BUILD_HARDENING_PIE'}=1;/ at -e line 1. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/default{ <-- HERE 'DEB_BUILD_HARDENING_STACKPROTECTOR'}=1;/ at -e line 1. + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.AW4yNk + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386 ++ dirname /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386 + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386 + cd hardening-wrapper-2.6 + /usr/bin/install -Dpm 0755 hardening-wrapper/build-tree/hardening-check /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/bin/hardening-check + /usr/bin/install -Dpm 0644 hardening-wrapper/build-tree/hardening-check.1 /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/man/man1/hardening-check.1 + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1 + /usr/lib/rpm/brp-python-hardlink + /usr/lib/rpm/redhat/brp-java-repack-jars Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.XuE4HC + umask 022 + cd /builddir/build/BUILD + cd hardening-wrapper-2.6 + /usr/bin/make -O -j6 -C hardening-wrapper check make: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper' make -C tests check make[1]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[1]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[1]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Check the stack protector and PIE options directly, just to have # a historical record in the build logs. cc -Wall -fstack-protector hello.c -o ../build-tree/cc-test || true ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x804849b) cc -Wall -fstack-protector-strong hello.c -o ../build-tree/cc-test || true ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x804849b) cc -Wall -fPIE -pie hello.c -o ../build-tree/cc-test || true ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x565d9628) ../build-tree/cc-test || true ../build-tree/cc-test: ok (0x5655e628) make[1]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make -f Makefile.wrapper check make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Test basic perl syntax for script in ../build-tree/hardened-cc ../build-tree/hardened-ld ../build-tree/hardened-c++; do perl -c $script; done touch syntax.stamp make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Compiler and linker options disabled. DEB_BUILD_HARDENING=0 ../build-tree/hardened-cc -B ../build-tree/ -o ../build-tree/wrapper-test-stock hello.c readelf -ldrsW ../build-tree/wrapper-test-stock Elf file type is EXEC (Executable file) Entry point 0x8048340 There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x08048154 0x08048154 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x00684 0x00684 R E 0x1000 LOAD 0x000f08 0x08049f08 0x08049f08 0x00114 0x00118 RW 0x1000 DYNAMIC 0x000f14 0x08049f14 0x08049f14 0x000e8 0x000e8 RW 0x4 NOTE 0x000168 0x08048168 0x08048168 0x00044 0x00044 R 0x4 GNU_EH_FRAME 0x000564 0x08048564 0x08048564 0x00034 0x00034 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 GNU_RELRO 0x000f08 0x08049f08 0x08049f08 0x000f8 0x000f8 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .plt.got .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xf14 contains 24 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x80482c8 0x0000000d (FINI) 0x8048534 0x00000019 (INIT_ARRAY) 0x8049f08 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8049f0c 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x6ffffef5 (GNU_HASH) 0x80481ac 0x00000005 (STRTAB) 0x804822c 0x00000006 (SYMTAB) 0x80481cc 0x0000000a (STRSZ) 78 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x804a000 0x00000002 (PLTRELSZ) 24 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x80482b0 0x00000011 (REL) 0x80482a8 0x00000012 (RELSZ) 8 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x8048288 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x804827a 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x2a8 contains 1 entries: Offset Info Type Sym. Value Symbol's Name 08049ffc 00000206 R_386_GLOB_DAT 00000000 __gmon_start__ Relocation section '.rel.plt' at offset 0x2b0 contains 3 entries: Offset Info Type Sym. Value Symbol's Name 0804a00c 00000107 R_386_JUMP_SLOT 00000000 printf@GLIBC_2.0 0804a010 00000307 R_386_JUMP_SLOT 00000000 __libc_start_main@GLIBC_2.0 0804a014 00000407 R_386_JUMP_SLOT 00000000 snprintf@GLIBC_2.0 Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.0 (2) 2: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 3: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.0 (2) 4: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.0 (2) 5: 0804854c 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used Symbol table '.symtab' contains 71 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 08048154 0 SECTION LOCAL DEFAULT 1 2: 08048168 0 SECTION LOCAL DEFAULT 2 3: 08048188 0 SECTION LOCAL DEFAULT 3 4: 080481ac 0 SECTION LOCAL DEFAULT 4 5: 080481cc 0 SECTION LOCAL DEFAULT 5 6: 0804822c 0 SECTION LOCAL DEFAULT 6 7: 0804827a 0 SECTION LOCAL DEFAULT 7 8: 08048288 0 SECTION LOCAL DEFAULT 8 9: 080482a8 0 SECTION LOCAL DEFAULT 9 10: 080482b0 0 SECTION LOCAL DEFAULT 10 11: 080482c8 0 SECTION LOCAL DEFAULT 11 12: 080482f0 0 SECTION LOCAL DEFAULT 12 13: 08048330 0 SECTION LOCAL DEFAULT 13 14: 08048340 0 SECTION LOCAL DEFAULT 14 15: 08048534 0 SECTION LOCAL DEFAULT 15 16: 08048548 0 SECTION LOCAL DEFAULT 16 17: 08048564 0 SECTION LOCAL DEFAULT 17 18: 08048598 0 SECTION LOCAL DEFAULT 18 19: 08049f08 0 SECTION LOCAL DEFAULT 19 20: 08049f0c 0 SECTION LOCAL DEFAULT 20 21: 08049f10 0 SECTION LOCAL DEFAULT 21 22: 08049f14 0 SECTION LOCAL DEFAULT 22 23: 08049ffc 0 SECTION LOCAL DEFAULT 23 24: 0804a000 0 SECTION LOCAL DEFAULT 24 25: 0804a018 0 SECTION LOCAL DEFAULT 25 26: 0804a01c 0 SECTION LOCAL DEFAULT 26 27: 00000000 0 SECTION LOCAL DEFAULT 27 28: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 29: 08049f10 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 30: 08048380 0 FUNC LOCAL DEFAULT 14 deregister_tm_clones 31: 080483b0 0 FUNC LOCAL DEFAULT 14 register_tm_clones 32: 080483f0 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 33: 0804a01c 1 OBJECT LOCAL DEFAULT 26 completed.6554 34: 08049f0c 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 35: 08048420 0 FUNC LOCAL DEFAULT 14 frame_dummy 36: 08049f08 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 37: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 38: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 39: 08048680 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 40: 08049f10 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 41: 00000000 0 FILE LOCAL DEFAULT ABS 42: 08049f0c 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 43: 08049f14 0 OBJECT LOCAL DEFAULT 22 _DYNAMIC 44: 08049f08 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 45: 08048564 0 NOTYPE LOCAL DEFAULT 17 __GNU_EH_FRAME_HDR 46: 0804a000 0 OBJECT LOCAL DEFAULT 24 _GLOBAL_OFFSET_TABLE_ 47: 08048530 2 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 48: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 49: 08048370 4 FUNC GLOBAL HIDDEN 14 __x86.get_pc_thunk.bx 50: 0804a018 0 NOTYPE WEAK DEFAULT 25 data_start 51: 00000000 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.0 52: 0804a01c 0 NOTYPE GLOBAL DEFAULT 25 _edata 53: 08048534 0 FUNC GLOBAL DEFAULT 15 _fini 54: 0804a018 0 NOTYPE GLOBAL DEFAULT 25 __data_start 55: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 56: 08048550 0 OBJECT GLOBAL HIDDEN 16 __dso_handle 57: 0804844b 67 FUNC GLOBAL DEFAULT 14 announcement 58: 0804854c 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 59: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.0 60: 080484d0 93 FUNC GLOBAL DEFAULT 14 __libc_csu_init 61: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.0 62: 0804a020 0 NOTYPE GLOBAL DEFAULT 26 _end 63: 08048340 0 FUNC GLOBAL DEFAULT 14 _start 64: 08048548 4 OBJECT GLOBAL DEFAULT 16 _fp_hw 65: 0804a01c 0 NOTYPE GLOBAL DEFAULT 26 __bss_start 66: 0804848e 52 FUNC GLOBAL DEFAULT 14 main 67: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 68: 0804a01c 0 OBJECT GLOBAL HIDDEN 25 __TMC_END__ 69: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 70: 080482c8 0 FUNC GLOBAL DEFAULT 11 _init ../build-tree/wrapper-test-stock ../build-tree/wrapper-test-stock: ok (0x804844b) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Compiler options enabled. (linker is not wrapper) ../build-tree/hardened-cc -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-compiled hello.c readelf -ldrsW ../build-tree/wrapper-test-compiled Elf file type is EXEC (Executable file) Entry point 0x80483ee There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x08048154 0x08048154 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x0073c 0x0073c R E 0x1000 LOAD 0x000f08 0x08049f08 0x08049f08 0x00118 0x0011c RW 0x1000 DYNAMIC 0x000f14 0x08049f14 0x08049f14 0x000e8 0x000e8 RW 0x4 NOTE 0x000168 0x08048168 0x08048168 0x00044 0x00044 R 0x4 GNU_EH_FRAME 0x0005f4 0x080485f4 0x080485f4 0x00034 0x00034 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 GNU_RELRO 0x000f08 0x08049f08 0x08049f08 0x000f8 0x000f8 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .plt.got .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xf14 contains 24 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x8048334 0x0000000d (FINI) 0x80485c4 0x00000019 (INIT_ARRAY) 0x8049f08 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8049f0c 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x6ffffef5 (GNU_HASH) 0x80481ac 0x00000005 (STRTAB) 0x804823c 0x00000006 (SYMTAB) 0x80481cc 0x0000000a (STRSZ) 130 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x804a000 0x00000002 (PLTRELSZ) 32 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x8048314 0x00000011 (REL) 0x804830c 0x00000012 (RELSZ) 8 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x80482cc 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x80482be 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x30c contains 1 entries: Offset Info Type Sym. Value Symbol's Name 08049ffc 00000206 R_386_GLOB_DAT 00000000 __gmon_start__ Relocation section '.rel.plt' at offset 0x314 contains 4 entries: Offset Info Type Sym. Value Symbol's Name 0804a00c 00000107 R_386_JUMP_SLOT 00000000 __stack_chk_fail@GLIBC_2.4 0804a010 00000307 R_386_JUMP_SLOT 00000000 __libc_start_main@GLIBC_2.0 0804a014 00000407 R_386_JUMP_SLOT 00000000 snprintf@GLIBC_2.0 0804a018 00000507 R_386_JUMP_SLOT 00000000 __printf_chk@GLIBC_2.3.4 Symbol table '.dynsym' contains 7 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 2: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 3: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.0 (3) 4: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.0 (3) 5: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (4) 6: 080485dc 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used Symbol table '.symtab' contains 72 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 08048154 0 SECTION LOCAL DEFAULT 1 2: 08048168 0 SECTION LOCAL DEFAULT 2 3: 08048188 0 SECTION LOCAL DEFAULT 3 4: 080481ac 0 SECTION LOCAL DEFAULT 4 5: 080481cc 0 SECTION LOCAL DEFAULT 5 6: 0804823c 0 SECTION LOCAL DEFAULT 6 7: 080482be 0 SECTION LOCAL DEFAULT 7 8: 080482cc 0 SECTION LOCAL DEFAULT 8 9: 0804830c 0 SECTION LOCAL DEFAULT 9 10: 08048314 0 SECTION LOCAL DEFAULT 10 11: 08048334 0 SECTION LOCAL DEFAULT 11 12: 08048360 0 SECTION LOCAL DEFAULT 12 13: 080483b0 0 SECTION LOCAL DEFAULT 13 14: 080483c0 0 SECTION LOCAL DEFAULT 14 15: 080485c4 0 SECTION LOCAL DEFAULT 15 16: 080485d8 0 SECTION LOCAL DEFAULT 16 17: 080485f4 0 SECTION LOCAL DEFAULT 17 18: 08048628 0 SECTION LOCAL DEFAULT 18 19: 08049f08 0 SECTION LOCAL DEFAULT 19 20: 08049f0c 0 SECTION LOCAL DEFAULT 20 21: 08049f10 0 SECTION LOCAL DEFAULT 21 22: 08049f14 0 SECTION LOCAL DEFAULT 22 23: 08049ffc 0 SECTION LOCAL DEFAULT 23 24: 0804a000 0 SECTION LOCAL DEFAULT 24 25: 0804a01c 0 SECTION LOCAL DEFAULT 25 26: 0804a020 0 SECTION LOCAL DEFAULT 26 27: 00000000 0 SECTION LOCAL DEFAULT 27 28: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 29: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 30: 08049f10 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 31: 08048420 0 FUNC LOCAL DEFAULT 14 deregister_tm_clones 32: 08048450 0 FUNC LOCAL DEFAULT 14 register_tm_clones 33: 08048490 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 34: 0804a020 1 OBJECT LOCAL DEFAULT 26 completed.6554 35: 08049f0c 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 36: 080484c0 0 FUNC LOCAL DEFAULT 14 frame_dummy 37: 08049f08 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 38: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 39: 08048738 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 40: 08049f10 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 41: 00000000 0 FILE LOCAL DEFAULT ABS 42: 08049f0c 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 43: 08049f14 0 OBJECT LOCAL DEFAULT 22 _DYNAMIC 44: 08049f08 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 45: 080485f4 0 NOTYPE LOCAL DEFAULT 17 __GNU_EH_FRAME_HDR 46: 0804a000 0 OBJECT LOCAL DEFAULT 24 _GLOBAL_OFFSET_TABLE_ 47: 080485c0 2 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 48: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 49: 08048410 4 FUNC GLOBAL HIDDEN 14 __x86.get_pc_thunk.bx 50: 0804a01c 0 NOTYPE WEAK DEFAULT 25 data_start 51: 0804a020 0 NOTYPE GLOBAL DEFAULT 25 _edata 52: 080485c4 0 FUNC GLOBAL DEFAULT 15 _fini 53: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 54: 0804a01c 0 NOTYPE GLOBAL DEFAULT 25 __data_start 55: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 56: 080485e0 0 OBJECT GLOBAL HIDDEN 16 __dso_handle 57: 080484f0 99 FUNC GLOBAL DEFAULT 14 announcement 58: 080485dc 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 59: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.0 60: 08048560 93 FUNC GLOBAL DEFAULT 14 __libc_csu_init 61: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.0 62: 0804a024 0 NOTYPE GLOBAL DEFAULT 26 _end 63: 080483ee 0 FUNC GLOBAL DEFAULT 14 _start 64: 080485d8 4 OBJECT GLOBAL DEFAULT 16 _fp_hw 65: 0804a020 0 NOTYPE GLOBAL DEFAULT 26 __bss_start 66: 080483c0 46 FUNC GLOBAL DEFAULT 14 main 67: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 68: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 69: 0804a020 0 OBJECT GLOBAL HIDDEN 25 __TMC_END__ 70: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 71: 08048334 0 FUNC GLOBAL DEFAULT 11 _init # Run twice to show off PIE, if available in kernel ../build-tree/wrapper-test-compiled ../build-tree/wrapper-test-compiled: ok (0x80484f0) ../build-tree/wrapper-test-compiled ../build-tree/wrapper-test-compiled: ok (0x80484f0) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Enable symlink for ld to trick gcc into doing wrapped linking (cd ../build-tree && ln -s hardened-ld ld) (cd ../build-tree && ln -s hardened-ld ld.gold) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Compiler and linker options enabled. ../build-tree/hardened-cc -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-linked hello.c readelf -ldrsW ../build-tree/wrapper-test-linked Elf file type is EXEC (Executable file) Entry point 0x80483de There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x08048154 0x08048154 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x0072c 0x0072c R E 0x1000 LOAD 0x000ef4 0x08049ef4 0x08049ef4 0x00110 0x00114 RW 0x1000 DYNAMIC 0x000f00 0x08049f00 0x08049f00 0x000e0 0x000e0 RW 0x4 NOTE 0x000168 0x08048168 0x08048168 0x00044 0x00044 R 0x4 GNU_EH_FRAME 0x0005e4 0x080485e4 0x080485e4 0x00034 0x00034 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 GNU_RELRO 0x000ef4 0x08049ef4 0x08049ef4 0x0010c 0x0010c R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .init .plt .plt.got .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xf00 contains 23 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x8048348 0x0000000d (FINI) 0x80485b4 0x00000019 (INIT_ARRAY) 0x8049ef4 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8049ef8 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x6ffffef5 (GNU_HASH) 0x80481ac 0x00000005 (STRTAB) 0x8048250 0x00000006 (SYMTAB) 0x80481e0 0x0000000a (STRSZ) 130 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x8049fe0 0x00000011 (REL) 0x8048320 0x00000012 (RELSZ) 40 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x00000018 (BIND_NOW) 0x6ffffffb (FLAGS_1) Flags: NOW 0x6ffffffe (VERNEED) 0x80482e0 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x80482d2 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x320 contains 5 entries: Offset Info Type Sym. Value Symbol's Name 08049fec 00000506 R_386_GLOB_DAT 00000000 __stack_chk_fail@GLIBC_2.4 08049ff0 00000106 R_386_GLOB_DAT 00000000 __gmon_start__ 08049ff4 00000606 R_386_GLOB_DAT 00000000 __libc_start_main@GLIBC_2.0 08049ff8 00000306 R_386_GLOB_DAT 00000000 snprintf@GLIBC_2.0 08049ffc 00000406 R_386_GLOB_DAT 00000000 __printf_chk@GLIBC_2.3.4 Symbol table '.dynsym' contains 7 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 2: 080485cc 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 3: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.0 (3) 4: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (4) 5: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 6: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.0 (3) Symbol table '.symtab' contains 70 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 08048154 0 SECTION LOCAL DEFAULT 1 2: 08048168 0 SECTION LOCAL DEFAULT 2 3: 08048188 0 SECTION LOCAL DEFAULT 3 4: 080481ac 0 SECTION LOCAL DEFAULT 4 5: 080481e0 0 SECTION LOCAL DEFAULT 5 6: 08048250 0 SECTION LOCAL DEFAULT 6 7: 080482d2 0 SECTION LOCAL DEFAULT 7 8: 080482e0 0 SECTION LOCAL DEFAULT 8 9: 08048320 0 SECTION LOCAL DEFAULT 9 10: 08048348 0 SECTION LOCAL DEFAULT 10 11: 08048370 0 SECTION LOCAL DEFAULT 11 12: 08048380 0 SECTION LOCAL DEFAULT 12 13: 080483b0 0 SECTION LOCAL DEFAULT 13 14: 080485b4 0 SECTION LOCAL DEFAULT 14 15: 080485c8 0 SECTION LOCAL DEFAULT 15 16: 080485e4 0 SECTION LOCAL DEFAULT 16 17: 08048618 0 SECTION LOCAL DEFAULT 17 18: 08049ef4 0 SECTION LOCAL DEFAULT 18 19: 08049ef8 0 SECTION LOCAL DEFAULT 19 20: 08049efc 0 SECTION LOCAL DEFAULT 20 21: 08049f00 0 SECTION LOCAL DEFAULT 21 22: 08049fe0 0 SECTION LOCAL DEFAULT 22 23: 0804a000 0 SECTION LOCAL DEFAULT 23 24: 0804a004 0 SECTION LOCAL DEFAULT 24 25: 00000000 0 SECTION LOCAL DEFAULT 25 26: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 27: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 28: 08049efc 0 OBJECT LOCAL DEFAULT 20 __JCR_LIST__ 29: 08048410 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones 30: 08048440 0 FUNC LOCAL DEFAULT 13 register_tm_clones 31: 08048480 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux 32: 0804a004 1 OBJECT LOCAL DEFAULT 24 completed.6554 33: 08049ef8 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry 34: 080484b0 0 FUNC LOCAL DEFAULT 13 frame_dummy 35: 08049ef4 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry 36: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 37: 08048728 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__ 38: 08049efc 0 OBJECT LOCAL DEFAULT 20 __JCR_END__ 39: 00000000 0 FILE LOCAL DEFAULT ABS 40: 08049ef8 0 NOTYPE LOCAL DEFAULT 18 __init_array_end 41: 08049f00 0 OBJECT LOCAL DEFAULT 21 _DYNAMIC 42: 08049ef4 0 NOTYPE LOCAL DEFAULT 18 __init_array_start 43: 080485e4 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR 44: 08049fe0 0 OBJECT LOCAL DEFAULT 22 _GLOBAL_OFFSET_TABLE_ 45: 080485b0 2 FUNC GLOBAL DEFAULT 13 __libc_csu_fini 46: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 47: 08048400 4 FUNC GLOBAL HIDDEN 13 __x86.get_pc_thunk.bx 48: 0804a000 0 NOTYPE WEAK DEFAULT 23 data_start 49: 0804a004 0 NOTYPE GLOBAL DEFAULT 23 _edata 50: 080485b4 0 FUNC GLOBAL DEFAULT 14 _fini 51: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 52: 0804a000 0 NOTYPE GLOBAL DEFAULT 23 __data_start 53: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 54: 080485d0 0 OBJECT GLOBAL HIDDEN 15 __dso_handle 55: 080484e0 99 FUNC GLOBAL DEFAULT 13 announcement 56: 080485cc 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 57: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.0 58: 08048550 93 FUNC GLOBAL DEFAULT 13 __libc_csu_init 59: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.0 60: 0804a008 0 NOTYPE GLOBAL DEFAULT 24 _end 61: 080483de 0 FUNC GLOBAL DEFAULT 13 _start 62: 080485c8 4 OBJECT GLOBAL DEFAULT 15 _fp_hw 63: 0804a004 0 NOTYPE GLOBAL DEFAULT 24 __bss_start 64: 080483b0 46 FUNC GLOBAL DEFAULT 13 main 65: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 66: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 67: 0804a004 0 OBJECT GLOBAL HIDDEN 23 __TMC_END__ 68: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 69: 08048348 0 FUNC GLOBAL DEFAULT 10 _init # Run twice to show off PIE, if available in kernel ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: ok (0x80484e0) ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: ok (0x80484e0) # Check state of hardening features via check script perl ../build-tree/hardening-check -p ../build-tree/wrapper-test-linked ../build-tree/wrapper-test-linked: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes # Manually check state of hardening features # Skipped PIE test # Test Stack Protector nm ../build-tree/wrapper-test-linked | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 # Test Fortify nm ../build-tree/wrapper-test-linked | egrep '__(sn)?printf_chk($|@@GLIBC)' U __printf_chk@@GLIBC_2.3.4 # Test Format (no-op currently) # Test for RELRO readelf -lW ../build-tree/wrapper-test-linked | grep GNU_RELRO GNU_RELRO 0x000ef4 0x08049ef4 0x08049ef4 0x0010c 0x0010c R 0x1 # Test for BIND_NOW readelf -dW ../build-tree/wrapper-test-linked | grep BIND_NOW 0x00000018 (BIND_NOW) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Build directly with -fPIC already defined ../build-tree/hardened-cc -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC-direct hello.c ../build-tree/wrapper-test-fPIC-direct ../build-tree/wrapper-test-fPIC-direct: ok (0x8048520) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Build .o with -fPIC already defined ../build-tree/hardened-cc -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC.o -c hello.c make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Link .o with -fPIC already defined ../build-tree/hardened-cc -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC.o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC: ok (0x8048520) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Make sure build fails due to -Werror=format-security ! ../build-tree/hardened-cc -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-format-security format.c # Make sure build succeeds with -Wno-format-security ../build-tree/hardened-cc -B ../build-tree/ -O2 -Wno-format-security -o ../build-tree/wrapper-test-format-security format.c make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Make sure build stack-protects a small ssp buffer ../build-tree/hardened-cc -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-ssp-buffer-size-protect ssp-buffer-size-protect.c # Test Stack Protector nm ../build-tree/wrapper-test-ssp-buffer-size-protect | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Make sure build stack-protects a non-char array ../build-tree/hardened-cc -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-ssp-buffer-type-protect ssp-buffer-type-protect.c # Test Stack Protector nm ../build-tree/wrapper-test-ssp-buffer-type-protect | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' ../build-tree/hardened-cc -B ../build-tree/ -O2 -c -o ../build-tree/wrapper-test-all.o hello.c make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' ar r ../build-tree/wrapper-test-all.a ../build-tree/wrapper-test-all.o readelf -ldrsW ../build-tree/wrapper-test-all.a File: ../build-tree/wrapper-test-all.a(wrapper-test-all.o) There are no program headers in this file. Relocation section '.rel.text' at offset 0x2dc contains 6 entries: Offset Info Type Sym. Value Symbol's Name 0000001e 00000501 R_386_32 00000000 .rodata.str1.1 0000002d 00000b02 R_386_PC32 00000000 snprintf 00000032 00000a01 R_386_32 00000000 announcement 00000038 00000501 R_386_32 00000000 .rodata.str1.1 0000003f 00000c02 R_386_PC32 00000000 __printf_chk 0000005f 00000d02 R_386_PC32 00000000 __stack_chk_fail Relocation section '.rel.text.startup' at offset 0x30c contains 1 entries: Offset Info Type Sym. Value Symbol's Name 00000017 00000a02 R_386_PC32 00000000 announcement Relocation section '.rel.eh_frame' at offset 0x314 contains 2 entries: Offset Info Type Sym. Value Symbol's Name 00000020 00000202 R_386_PC32 00000000 .text 00000068 00000602 R_386_PC32 00000000 .text.startup Symbol table '.symtab' contains 15 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 00000000 0 SECTION LOCAL DEFAULT 1 3: 00000000 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 SECTION LOCAL DEFAULT 5 6: 00000000 0 SECTION LOCAL DEFAULT 6 7: 00000000 0 SECTION LOCAL DEFAULT 9 8: 00000000 0 SECTION LOCAL DEFAULT 10 9: 00000000 0 SECTION LOCAL DEFAULT 8 10: 00000000 99 FUNC GLOBAL DEFAULT 1 announcement 11: 00000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 12: 00000000 0 NOTYPE GLOBAL DEFAULT UND __printf_chk 13: 00000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail 14: 00000000 46 FUNC GLOBAL DEFAULT 6 main perl ../build-tree/hardening-check -p ../build-tree/wrapper-test-all.a ../build-tree/wrapper-test-all.a: Position Independent Executable: no, object archive (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' DEB_BUILD_HARDENING=0 ../build-tree/hardened-cc -B ../build-tree/ -c -o ../build-tree/wrapper-test-none.o hello.c make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' ar r ../build-tree/wrapper-test-none.a ../build-tree/wrapper-test-none.o readelf -ldrsW ../build-tree/wrapper-test-none.a File: ../build-tree/wrapper-test-none.a(wrapper-test-none.o) There are no program headers in this file. Relocation section '.rel.text' at offset 0x240 contains 6 entries: Offset Info Type Sym. Value Symbol's Name 0000000d 00000501 R_386_32 00000000 .rodata 0000001e 00000a02 R_386_PC32 00000000 snprintf 00000029 00000901 R_386_32 00000000 announcement 00000035 00000501 R_386_32 00000000 .rodata 0000003a 00000b02 R_386_PC32 00000000 printf 00000060 00000902 R_386_PC32 00000000 announcement Relocation section '.rel.eh_frame' at offset 0x270 contains 2 entries: Offset Info Type Sym. Value Symbol's Name 00000020 00000202 R_386_PC32 00000000 .text 00000040 00000202 R_386_PC32 00000000 .text Symbol table '.symtab' contains 13 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 00000000 0 SECTION LOCAL DEFAULT 1 3: 00000000 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 SECTION LOCAL DEFAULT 5 6: 00000000 0 SECTION LOCAL DEFAULT 7 7: 00000000 0 SECTION LOCAL DEFAULT 8 8: 00000000 0 SECTION LOCAL DEFAULT 6 9: 00000000 67 FUNC GLOBAL DEFAULT 1 announcement 10: 00000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 11: 00000000 0 NOTYPE GLOBAL DEFAULT UND printf 12: 00000043 52 FUNC GLOBAL DEFAULT 1 main if perl ../build-tree/hardening-check -p ../build-tree/wrapper-test-none.a; then exit 1; fi ../build-tree/wrapper-test-none.a: Position Independent Executable: no, object archive (ignored) Stack protected: no, not found! Fortify Source functions: no, only unprotected functions found! Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make -f Makefile.includes check make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Compiler and linker options disabled. DEB_BUILD_HARDENING=0 cc -o ../build-tree/includes-test-stock hello.c readelf -ldrsW ../build-tree/includes-test-stock Elf file type is EXEC (Executable file) Entry point 0x8048340 There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x08048154 0x08048154 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x00684 0x00684 R E 0x1000 LOAD 0x000f08 0x08049f08 0x08049f08 0x00114 0x00118 RW 0x1000 DYNAMIC 0x000f14 0x08049f14 0x08049f14 0x000e8 0x000e8 RW 0x4 NOTE 0x000168 0x08048168 0x08048168 0x00044 0x00044 R 0x4 GNU_EH_FRAME 0x000564 0x08048564 0x08048564 0x00034 0x00034 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 GNU_RELRO 0x000f08 0x08049f08 0x08049f08 0x000f8 0x000f8 R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .plt.got .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xf14 contains 24 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x80482c8 0x0000000d (FINI) 0x8048534 0x00000019 (INIT_ARRAY) 0x8049f08 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8049f0c 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x6ffffef5 (GNU_HASH) 0x80481ac 0x00000005 (STRTAB) 0x804822c 0x00000006 (SYMTAB) 0x80481cc 0x0000000a (STRSZ) 78 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x804a000 0x00000002 (PLTRELSZ) 24 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x80482b0 0x00000011 (REL) 0x80482a8 0x00000012 (RELSZ) 8 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x8048288 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x804827a 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x2a8 contains 1 entries: Offset Info Type Sym. Value Symbol's Name 08049ffc 00000206 R_386_GLOB_DAT 00000000 __gmon_start__ Relocation section '.rel.plt' at offset 0x2b0 contains 3 entries: Offset Info Type Sym. Value Symbol's Name 0804a00c 00000107 R_386_JUMP_SLOT 00000000 printf@GLIBC_2.0 0804a010 00000307 R_386_JUMP_SLOT 00000000 __libc_start_main@GLIBC_2.0 0804a014 00000407 R_386_JUMP_SLOT 00000000 snprintf@GLIBC_2.0 Symbol table '.dynsym' contains 6 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.0 (2) 2: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 3: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.0 (2) 4: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.0 (2) 5: 0804854c 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used Symbol table '.symtab' contains 71 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 08048154 0 SECTION LOCAL DEFAULT 1 2: 08048168 0 SECTION LOCAL DEFAULT 2 3: 08048188 0 SECTION LOCAL DEFAULT 3 4: 080481ac 0 SECTION LOCAL DEFAULT 4 5: 080481cc 0 SECTION LOCAL DEFAULT 5 6: 0804822c 0 SECTION LOCAL DEFAULT 6 7: 0804827a 0 SECTION LOCAL DEFAULT 7 8: 08048288 0 SECTION LOCAL DEFAULT 8 9: 080482a8 0 SECTION LOCAL DEFAULT 9 10: 080482b0 0 SECTION LOCAL DEFAULT 10 11: 080482c8 0 SECTION LOCAL DEFAULT 11 12: 080482f0 0 SECTION LOCAL DEFAULT 12 13: 08048330 0 SECTION LOCAL DEFAULT 13 14: 08048340 0 SECTION LOCAL DEFAULT 14 15: 08048534 0 SECTION LOCAL DEFAULT 15 16: 08048548 0 SECTION LOCAL DEFAULT 16 17: 08048564 0 SECTION LOCAL DEFAULT 17 18: 08048598 0 SECTION LOCAL DEFAULT 18 19: 08049f08 0 SECTION LOCAL DEFAULT 19 20: 08049f0c 0 SECTION LOCAL DEFAULT 20 21: 08049f10 0 SECTION LOCAL DEFAULT 21 22: 08049f14 0 SECTION LOCAL DEFAULT 22 23: 08049ffc 0 SECTION LOCAL DEFAULT 23 24: 0804a000 0 SECTION LOCAL DEFAULT 24 25: 0804a018 0 SECTION LOCAL DEFAULT 25 26: 0804a01c 0 SECTION LOCAL DEFAULT 26 27: 00000000 0 SECTION LOCAL DEFAULT 27 28: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 29: 08049f10 0 OBJECT LOCAL DEFAULT 21 __JCR_LIST__ 30: 08048380 0 FUNC LOCAL DEFAULT 14 deregister_tm_clones 31: 080483b0 0 FUNC LOCAL DEFAULT 14 register_tm_clones 32: 080483f0 0 FUNC LOCAL DEFAULT 14 __do_global_dtors_aux 33: 0804a01c 1 OBJECT LOCAL DEFAULT 26 completed.6554 34: 08049f0c 0 OBJECT LOCAL DEFAULT 20 __do_global_dtors_aux_fini_array_entry 35: 08048420 0 FUNC LOCAL DEFAULT 14 frame_dummy 36: 08049f08 0 OBJECT LOCAL DEFAULT 19 __frame_dummy_init_array_entry 37: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 38: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 39: 08048680 0 OBJECT LOCAL DEFAULT 18 __FRAME_END__ 40: 08049f10 0 OBJECT LOCAL DEFAULT 21 __JCR_END__ 41: 00000000 0 FILE LOCAL DEFAULT ABS 42: 08049f0c 0 NOTYPE LOCAL DEFAULT 19 __init_array_end 43: 08049f14 0 OBJECT LOCAL DEFAULT 22 _DYNAMIC 44: 08049f08 0 NOTYPE LOCAL DEFAULT 19 __init_array_start 45: 08048564 0 NOTYPE LOCAL DEFAULT 17 __GNU_EH_FRAME_HDR 46: 0804a000 0 OBJECT LOCAL DEFAULT 24 _GLOBAL_OFFSET_TABLE_ 47: 08048530 2 FUNC GLOBAL DEFAULT 14 __libc_csu_fini 48: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 49: 08048370 4 FUNC GLOBAL HIDDEN 14 __x86.get_pc_thunk.bx 50: 0804a018 0 NOTYPE WEAK DEFAULT 25 data_start 51: 00000000 0 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.0 52: 0804a01c 0 NOTYPE GLOBAL DEFAULT 25 _edata 53: 08048534 0 FUNC GLOBAL DEFAULT 15 _fini 54: 0804a018 0 NOTYPE GLOBAL DEFAULT 25 __data_start 55: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 56: 08048550 0 OBJECT GLOBAL HIDDEN 16 __dso_handle 57: 0804844b 67 FUNC GLOBAL DEFAULT 14 announcement 58: 0804854c 4 OBJECT GLOBAL DEFAULT 16 _IO_stdin_used 59: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.0 60: 080484d0 93 FUNC GLOBAL DEFAULT 14 __libc_csu_init 61: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.0 62: 0804a020 0 NOTYPE GLOBAL DEFAULT 26 _end 63: 08048340 0 FUNC GLOBAL DEFAULT 14 _start 64: 08048548 4 OBJECT GLOBAL DEFAULT 16 _fp_hw 65: 0804a01c 0 NOTYPE GLOBAL DEFAULT 26 __bss_start 66: 0804848e 52 FUNC GLOBAL DEFAULT 14 main 67: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 68: 0804a01c 0 OBJECT GLOBAL HIDDEN 25 __TMC_END__ 69: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 70: 080482c8 0 FUNC GLOBAL DEFAULT 11 _init ../build-tree/includes-test-stock ../build-tree/includes-test-stock: ok (0x804844b) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Compiler options enabled. (linker is not wrapper) cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-compiled hello.c readelf -ldrsW ../build-tree/includes-test-compiled Elf file type is EXEC (Executable file) Entry point 0x80483de There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x08048154 0x08048154 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x0072c 0x0072c R E 0x1000 LOAD 0x000ef4 0x08049ef4 0x08049ef4 0x00110 0x00114 RW 0x1000 DYNAMIC 0x000f00 0x08049f00 0x08049f00 0x000e0 0x000e0 RW 0x4 NOTE 0x000168 0x08048168 0x08048168 0x00044 0x00044 R 0x4 GNU_EH_FRAME 0x0005e4 0x080485e4 0x080485e4 0x00034 0x00034 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 GNU_RELRO 0x000ef4 0x08049ef4 0x08049ef4 0x0010c 0x0010c R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .init .plt .plt.got .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xf00 contains 23 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x8048348 0x0000000d (FINI) 0x80485b4 0x00000019 (INIT_ARRAY) 0x8049ef4 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8049ef8 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x6ffffef5 (GNU_HASH) 0x80481ac 0x00000005 (STRTAB) 0x8048250 0x00000006 (SYMTAB) 0x80481e0 0x0000000a (STRSZ) 130 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x8049fe0 0x00000011 (REL) 0x8048320 0x00000012 (RELSZ) 40 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x00000018 (BIND_NOW) 0x6ffffffb (FLAGS_1) Flags: NOW 0x6ffffffe (VERNEED) 0x80482e0 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x80482d2 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x320 contains 5 entries: Offset Info Type Sym. Value Symbol's Name 08049fec 00000506 R_386_GLOB_DAT 00000000 __stack_chk_fail@GLIBC_2.4 08049ff0 00000106 R_386_GLOB_DAT 00000000 __gmon_start__ 08049ff4 00000606 R_386_GLOB_DAT 00000000 __libc_start_main@GLIBC_2.0 08049ff8 00000306 R_386_GLOB_DAT 00000000 snprintf@GLIBC_2.0 08049ffc 00000406 R_386_GLOB_DAT 00000000 __printf_chk@GLIBC_2.3.4 Symbol table '.dynsym' contains 7 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 2: 080485cc 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 3: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.0 (3) 4: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (4) 5: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 6: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.0 (3) Symbol table '.symtab' contains 70 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 08048154 0 SECTION LOCAL DEFAULT 1 2: 08048168 0 SECTION LOCAL DEFAULT 2 3: 08048188 0 SECTION LOCAL DEFAULT 3 4: 080481ac 0 SECTION LOCAL DEFAULT 4 5: 080481e0 0 SECTION LOCAL DEFAULT 5 6: 08048250 0 SECTION LOCAL DEFAULT 6 7: 080482d2 0 SECTION LOCAL DEFAULT 7 8: 080482e0 0 SECTION LOCAL DEFAULT 8 9: 08048320 0 SECTION LOCAL DEFAULT 9 10: 08048348 0 SECTION LOCAL DEFAULT 10 11: 08048370 0 SECTION LOCAL DEFAULT 11 12: 08048380 0 SECTION LOCAL DEFAULT 12 13: 080483b0 0 SECTION LOCAL DEFAULT 13 14: 080485b4 0 SECTION LOCAL DEFAULT 14 15: 080485c8 0 SECTION LOCAL DEFAULT 15 16: 080485e4 0 SECTION LOCAL DEFAULT 16 17: 08048618 0 SECTION LOCAL DEFAULT 17 18: 08049ef4 0 SECTION LOCAL DEFAULT 18 19: 08049ef8 0 SECTION LOCAL DEFAULT 19 20: 08049efc 0 SECTION LOCAL DEFAULT 20 21: 08049f00 0 SECTION LOCAL DEFAULT 21 22: 08049fe0 0 SECTION LOCAL DEFAULT 22 23: 0804a000 0 SECTION LOCAL DEFAULT 23 24: 0804a004 0 SECTION LOCAL DEFAULT 24 25: 00000000 0 SECTION LOCAL DEFAULT 25 26: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 27: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 28: 08049efc 0 OBJECT LOCAL DEFAULT 20 __JCR_LIST__ 29: 08048410 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones 30: 08048440 0 FUNC LOCAL DEFAULT 13 register_tm_clones 31: 08048480 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux 32: 0804a004 1 OBJECT LOCAL DEFAULT 24 completed.6554 33: 08049ef8 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry 34: 080484b0 0 FUNC LOCAL DEFAULT 13 frame_dummy 35: 08049ef4 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry 36: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 37: 08048728 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__ 38: 08049efc 0 OBJECT LOCAL DEFAULT 20 __JCR_END__ 39: 00000000 0 FILE LOCAL DEFAULT ABS 40: 08049ef8 0 NOTYPE LOCAL DEFAULT 18 __init_array_end 41: 08049f00 0 OBJECT LOCAL DEFAULT 21 _DYNAMIC 42: 08049ef4 0 NOTYPE LOCAL DEFAULT 18 __init_array_start 43: 080485e4 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR 44: 08049fe0 0 OBJECT LOCAL DEFAULT 22 _GLOBAL_OFFSET_TABLE_ 45: 080485b0 2 FUNC GLOBAL DEFAULT 13 __libc_csu_fini 46: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 47: 08048400 4 FUNC GLOBAL HIDDEN 13 __x86.get_pc_thunk.bx 48: 0804a000 0 NOTYPE WEAK DEFAULT 23 data_start 49: 0804a004 0 NOTYPE GLOBAL DEFAULT 23 _edata 50: 080485b4 0 FUNC GLOBAL DEFAULT 14 _fini 51: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 52: 0804a000 0 NOTYPE GLOBAL DEFAULT 23 __data_start 53: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 54: 080485d0 0 OBJECT GLOBAL HIDDEN 15 __dso_handle 55: 080484e0 99 FUNC GLOBAL DEFAULT 13 announcement 56: 080485cc 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 57: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.0 58: 08048550 93 FUNC GLOBAL DEFAULT 13 __libc_csu_init 59: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.0 60: 0804a008 0 NOTYPE GLOBAL DEFAULT 24 _end 61: 080483de 0 FUNC GLOBAL DEFAULT 13 _start 62: 080485c8 4 OBJECT GLOBAL DEFAULT 15 _fp_hw 63: 0804a004 0 NOTYPE GLOBAL DEFAULT 24 __bss_start 64: 080483b0 46 FUNC GLOBAL DEFAULT 13 main 65: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 66: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 67: 0804a004 0 OBJECT GLOBAL HIDDEN 23 __TMC_END__ 68: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 69: 08048348 0 FUNC GLOBAL DEFAULT 10 _init # Run twice to show off PIE, if available in kernel ../build-tree/includes-test-compiled ../build-tree/includes-test-compiled: ok (0x80484e0) ../build-tree/includes-test-compiled ../build-tree/includes-test-compiled: ok (0x80484e0) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Compiler and linker options enabled. cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-linked hello.c readelf -ldrsW ../build-tree/includes-test-linked Elf file type is EXEC (Executable file) Entry point 0x80483de There are 9 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4 INTERP 0x000154 0x08048154 0x08048154 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x0072c 0x0072c R E 0x1000 LOAD 0x000ef4 0x08049ef4 0x08049ef4 0x00110 0x00114 RW 0x1000 DYNAMIC 0x000f00 0x08049f00 0x08049f00 0x000e0 0x000e0 RW 0x4 NOTE 0x000168 0x08048168 0x08048168 0x00044 0x00044 R 0x4 GNU_EH_FRAME 0x0005e4 0x080485e4 0x080485e4 0x00034 0x00034 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 GNU_RELRO 0x000ef4 0x08049ef4 0x08049ef4 0x0010c 0x0010c R 0x1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .init .plt .plt.got .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 08 .init_array .fini_array .jcr .dynamic .got Dynamic section at offset 0xf00 contains 23 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x8048348 0x0000000d (FINI) 0x80485b4 0x00000019 (INIT_ARRAY) 0x8049ef4 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x8049ef8 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x6ffffef5 (GNU_HASH) 0x80481ac 0x00000005 (STRTAB) 0x8048250 0x00000006 (SYMTAB) 0x80481e0 0x0000000a (STRSZ) 130 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x8049fe0 0x00000011 (REL) 0x8048320 0x00000012 (RELSZ) 40 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x00000018 (BIND_NOW) 0x6ffffffb (FLAGS_1) Flags: NOW 0x6ffffffe (VERNEED) 0x80482e0 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x80482d2 0x00000000 (NULL) 0x0 Relocation section '.rel.dyn' at offset 0x320 contains 5 entries: Offset Info Type Sym. Value Symbol's Name 08049fec 00000506 R_386_GLOB_DAT 00000000 __stack_chk_fail@GLIBC_2.4 08049ff0 00000106 R_386_GLOB_DAT 00000000 __gmon_start__ 08049ff4 00000606 R_386_GLOB_DAT 00000000 __libc_start_main@GLIBC_2.0 08049ff8 00000306 R_386_GLOB_DAT 00000000 snprintf@GLIBC_2.0 08049ffc 00000406 R_386_GLOB_DAT 00000000 __printf_chk@GLIBC_2.3.4 Symbol table '.dynsym' contains 7 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 2: 080485cc 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 3: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@GLIBC_2.0 (3) 4: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.3.4 (4) 5: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@GLIBC_2.4 (2) 6: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.0 (3) Symbol table '.symtab' contains 70 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 08048154 0 SECTION LOCAL DEFAULT 1 2: 08048168 0 SECTION LOCAL DEFAULT 2 3: 08048188 0 SECTION LOCAL DEFAULT 3 4: 080481ac 0 SECTION LOCAL DEFAULT 4 5: 080481e0 0 SECTION LOCAL DEFAULT 5 6: 08048250 0 SECTION LOCAL DEFAULT 6 7: 080482d2 0 SECTION LOCAL DEFAULT 7 8: 080482e0 0 SECTION LOCAL DEFAULT 8 9: 08048320 0 SECTION LOCAL DEFAULT 9 10: 08048348 0 SECTION LOCAL DEFAULT 10 11: 08048370 0 SECTION LOCAL DEFAULT 11 12: 08048380 0 SECTION LOCAL DEFAULT 12 13: 080483b0 0 SECTION LOCAL DEFAULT 13 14: 080485b4 0 SECTION LOCAL DEFAULT 14 15: 080485c8 0 SECTION LOCAL DEFAULT 15 16: 080485e4 0 SECTION LOCAL DEFAULT 16 17: 08048618 0 SECTION LOCAL DEFAULT 17 18: 08049ef4 0 SECTION LOCAL DEFAULT 18 19: 08049ef8 0 SECTION LOCAL DEFAULT 19 20: 08049efc 0 SECTION LOCAL DEFAULT 20 21: 08049f00 0 SECTION LOCAL DEFAULT 21 22: 08049fe0 0 SECTION LOCAL DEFAULT 22 23: 0804a000 0 SECTION LOCAL DEFAULT 23 24: 0804a004 0 SECTION LOCAL DEFAULT 24 25: 00000000 0 SECTION LOCAL DEFAULT 25 26: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 27: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 28: 08049efc 0 OBJECT LOCAL DEFAULT 20 __JCR_LIST__ 29: 08048410 0 FUNC LOCAL DEFAULT 13 deregister_tm_clones 30: 08048440 0 FUNC LOCAL DEFAULT 13 register_tm_clones 31: 08048480 0 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux 32: 0804a004 1 OBJECT LOCAL DEFAULT 24 completed.6554 33: 08049ef8 0 OBJECT LOCAL DEFAULT 19 __do_global_dtors_aux_fini_array_entry 34: 080484b0 0 FUNC LOCAL DEFAULT 13 frame_dummy 35: 08049ef4 0 OBJECT LOCAL DEFAULT 18 __frame_dummy_init_array_entry 36: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c 37: 08048728 0 OBJECT LOCAL DEFAULT 17 __FRAME_END__ 38: 08049efc 0 OBJECT LOCAL DEFAULT 20 __JCR_END__ 39: 00000000 0 FILE LOCAL DEFAULT ABS 40: 08049ef8 0 NOTYPE LOCAL DEFAULT 18 __init_array_end 41: 08049f00 0 OBJECT LOCAL DEFAULT 21 _DYNAMIC 42: 08049ef4 0 NOTYPE LOCAL DEFAULT 18 __init_array_start 43: 080485e4 0 NOTYPE LOCAL DEFAULT 16 __GNU_EH_FRAME_HDR 44: 08049fe0 0 OBJECT LOCAL DEFAULT 22 _GLOBAL_OFFSET_TABLE_ 45: 080485b0 2 FUNC GLOBAL DEFAULT 13 __libc_csu_fini 46: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_deregisterTMCloneTable 47: 08048400 4 FUNC GLOBAL HIDDEN 13 __x86.get_pc_thunk.bx 48: 0804a000 0 NOTYPE WEAK DEFAULT 23 data_start 49: 0804a004 0 NOTYPE GLOBAL DEFAULT 23 _edata 50: 080485b4 0 FUNC GLOBAL DEFAULT 14 _fini 51: 00000000 0 FUNC GLOBAL DEFAULT UND __stack_chk_fail@@GLIBC_2.4 52: 0804a000 0 NOTYPE GLOBAL DEFAULT 23 __data_start 53: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__ 54: 080485d0 0 OBJECT GLOBAL HIDDEN 15 __dso_handle 55: 080484e0 99 FUNC GLOBAL DEFAULT 13 announcement 56: 080485cc 4 OBJECT GLOBAL DEFAULT 15 _IO_stdin_used 57: 00000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_2.0 58: 08048550 93 FUNC GLOBAL DEFAULT 13 __libc_csu_init 59: 00000000 0 FUNC GLOBAL DEFAULT UND snprintf@@GLIBC_2.0 60: 0804a008 0 NOTYPE GLOBAL DEFAULT 24 _end 61: 080483de 0 FUNC GLOBAL DEFAULT 13 _start 62: 080485c8 4 OBJECT GLOBAL DEFAULT 15 _fp_hw 63: 0804a004 0 NOTYPE GLOBAL DEFAULT 24 __bss_start 64: 080483b0 46 FUNC GLOBAL DEFAULT 13 main 65: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@@GLIBC_2.3.4 66: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses 67: 0804a004 0 OBJECT GLOBAL HIDDEN 23 __TMC_END__ 68: 00000000 0 NOTYPE WEAK DEFAULT UND _ITM_registerTMCloneTable 69: 08048348 0 FUNC GLOBAL DEFAULT 10 _init # Run twice to show off PIE, if available in kernel ../build-tree/includes-test-linked ../build-tree/includes-test-linked: ok (0x80484e0) ../build-tree/includes-test-linked ../build-tree/includes-test-linked: ok (0x80484e0) # Check state of hardening features via check script perl ../build-tree/hardening-check -p ../build-tree/includes-test-linked ../build-tree/includes-test-linked: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes # Manually check state of hardening features # Skipped PIE test # Test Stack Protector nm ../build-tree/includes-test-linked | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 # Test Fortify nm ../build-tree/includes-test-linked | egrep '__(sn)?printf_chk($|@@GLIBC)' U __printf_chk@@GLIBC_2.3.4 # Test Format (no-op currently) # Test for RELRO readelf -lW ../build-tree/includes-test-linked | grep GNU_RELRO GNU_RELRO 0x000ef4 0x08049ef4 0x08049ef4 0x0010c 0x0010c R 0x1 # Test for BIND_NOW readelf -dW ../build-tree/includes-test-linked | grep BIND_NOW 0x00000018 (BIND_NOW) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Build directly with -fPIC already defined cc -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-fPIC-direct hello.c ../build-tree/includes-test-fPIC-direct ../build-tree/includes-test-fPIC-direct: ok (0x8048520) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Build .o with -fPIC already defined cc -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-fPIC.o -c hello.c make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Link .o with -fPIC already defined cc -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-fPIC ../build-tree/includes-test-fPIC.o ../build-tree/includes-test-fPIC ../build-tree/includes-test-fPIC: ok (0x8048520) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Make sure build fails due to -Werror=format-security ! cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-format-security format.c # Make sure build succeeds with -Wno-format-security cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wno-format-security -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-format-security format.c make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Make sure build stack-protects a small ssp buffer cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-ssp-buffer-size-protect ssp-buffer-size-protect.c # Test Stack Protector nm ../build-tree/includes-test-ssp-buffer-size-protect | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Make sure build stack-protects a non-char array cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -o ../build-tree/includes-test-ssp-buffer-type-protect ssp-buffer-type-protect.c # Test Stack Protector nm ../build-tree/includes-test-ssp-buffer-type-protect | egrep '__stack_chk_fail($|@@GLIBC)' U __stack_chk_fail@@GLIBC_2.4 make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -c -o ../build-tree/includes-test-all.o hello.c make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' ar r ../build-tree/includes-test-all.a ../build-tree/includes-test-all.o readelf -ldrsW ../build-tree/includes-test-all.a File: ../build-tree/includes-test-all.a(includes-test-all.o) There are no program headers in this file. Relocation section '.rel.text' at offset 0x2dc contains 6 entries: Offset Info Type Sym. Value Symbol's Name 0000001e 00000501 R_386_32 00000000 .rodata.str1.1 0000002d 00000b02 R_386_PC32 00000000 snprintf 00000032 00000a01 R_386_32 00000000 announcement 00000038 00000501 R_386_32 00000000 .rodata.str1.1 0000003f 00000c02 R_386_PC32 00000000 __printf_chk 0000005f 00000d02 R_386_PC32 00000000 __stack_chk_fail Relocation section '.rel.text.startup' at offset 0x30c contains 1 entries: Offset Info Type Sym. Value Symbol's Name 00000017 00000a02 R_386_PC32 00000000 announcement Relocation section '.rel.eh_frame' at offset 0x314 contains 2 entries: Offset Info Type Sym. Value Symbol's Name 00000020 00000202 R_386_PC32 00000000 .text 00000068 00000602 R_386_PC32 00000000 .text.startup Symbol table '.symtab' contains 15 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 00000000 0 SECTION LOCAL DEFAULT 1 3: 00000000 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 SECTION LOCAL DEFAULT 5 6: 00000000 0 SECTION LOCAL DEFAULT 6 7: 00000000 0 SECTION LOCAL DEFAULT 9 8: 00000000 0 SECTION LOCAL DEFAULT 10 9: 00000000 0 SECTION LOCAL DEFAULT 8 10: 00000000 99 FUNC GLOBAL DEFAULT 1 announcement 11: 00000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 12: 00000000 0 NOTYPE GLOBAL DEFAULT UND __printf_chk 13: 00000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail 14: 00000000 46 FUNC GLOBAL DEFAULT 6 main perl ../build-tree/hardening-check -p ../build-tree/includes-test-all.a ../build-tree/includes-test-all.a: Position Independent Executable: no, object archive (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' DEB_BUILD_HARDENING=0 cc -c -o ../build-tree/includes-test-none.o hello.c make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' ar r ../build-tree/includes-test-none.a ../build-tree/includes-test-none.o readelf -ldrsW ../build-tree/includes-test-none.a File: ../build-tree/includes-test-none.a(includes-test-none.o) There are no program headers in this file. Relocation section '.rel.text' at offset 0x240 contains 6 entries: Offset Info Type Sym. Value Symbol's Name 0000000d 00000501 R_386_32 00000000 .rodata 0000001e 00000a02 R_386_PC32 00000000 snprintf 00000029 00000901 R_386_32 00000000 announcement 00000035 00000501 R_386_32 00000000 .rodata 0000003a 00000b02 R_386_PC32 00000000 printf 00000060 00000902 R_386_PC32 00000000 announcement Relocation section '.rel.eh_frame' at offset 0x270 contains 2 entries: Offset Info Type Sym. Value Symbol's Name 00000020 00000202 R_386_PC32 00000000 .text 00000040 00000202 R_386_PC32 00000000 .text Symbol table '.symtab' contains 13 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000000 0 FILE LOCAL DEFAULT ABS hello.c 2: 00000000 0 SECTION LOCAL DEFAULT 1 3: 00000000 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 00000000 0 SECTION LOCAL DEFAULT 5 6: 00000000 0 SECTION LOCAL DEFAULT 7 7: 00000000 0 SECTION LOCAL DEFAULT 8 8: 00000000 0 SECTION LOCAL DEFAULT 6 9: 00000000 67 FUNC GLOBAL DEFAULT 1 announcement 10: 00000000 0 NOTYPE GLOBAL DEFAULT UND snprintf 11: 00000000 0 NOTYPE GLOBAL DEFAULT UND printf 12: 00000043 52 FUNC GLOBAL DEFAULT 1 main if perl ../build-tree/hardening-check -p ../build-tree/includes-test-none.a; then exit 1; fi ../build-tree/includes-test-none.a: Position Independent Executable: no, object archive (ignored) Stack protected: no, not found! Fortify Source functions: no, only unprotected functions found! Read-only relocations: no, non-ELF (ignored) Immediate binding: no, non-ELF (ignored) make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make[2]: Entering directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' # Disable stack protector cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -fno-stack-protector -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) Stack protected: no, not found! Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: yes # Disable fortify cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -U_FORTIFY_SOURCE -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: no, only unprotected functions found! Read-only relocations: yes Immediate binding: yes # Disable relro cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -Wl,-z,norelro -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: no, not found! Immediate binding: yes # Disable bindnow cc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 -Wl,-z,relro -Wl,-z,now -Wl,-z,lazy -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) Stack protected: yes Fortify Source functions: yes (some protected functions found) Read-only relocations: yes Immediate binding: no, not found! # Disable everything cc \ -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -O2 \ -Wl,-z,relro -Wl,-z,now \ -fno-stack-protector \ -U_FORTIFY_SOURCE \ -Wno-format-security \ -Wl,-z,norelro \ -Wl,-z,lazy \ -o ../build-tree/includes-disabled hello.c if perl ../build-tree/hardening-check -p ../build-tree/includes-disabled; then exit 1; fi ../build-tree/includes-disabled: Position Independent Executable: no, normal executable! (ignored) Stack protected: no, not found! Fortify Source functions: no, only unprotected functions found! Read-only relocations: no, not found! Immediate binding: no, not found! readelf -ldW ../build-tree/includes-disabled Elf file type is EXEC (Executable file) Entry point 0x804834e There are 8 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x00100 0x00100 R E 0x4 INTERP 0x000134 0x08048134 0x08048134 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x00668 0x00668 R E 0x1000 LOAD 0x000668 0x08049668 0x08049668 0x00114 0x00118 RW 0x1000 DYNAMIC 0x000674 0x08049674 0x08049674 0x000e8 0x000e8 RW 0x4 NOTE 0x000148 0x08048148 0x08048148 0x00044 0x00044 R 0x4 GNU_EH_FRAME 0x000524 0x08048524 0x08048524 0x00034 0x00034 R 0x4 GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .plt.got .text .fini .rodata .eh_frame_hdr .eh_frame 03 .init_array .fini_array .jcr .dynamic .got .got.plt .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 Dynamic section at offset 0x674 contains 24 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x80482a8 0x0000000d (FINI) 0x80484f4 0x00000019 (INIT_ARRAY) 0x8049668 0x0000001b (INIT_ARRAYSZ) 4 (bytes) 0x0000001a (FINI_ARRAY) 0x804966c 0x0000001c (FINI_ARRAYSZ) 4 (bytes) 0x6ffffef5 (GNU_HASH) 0x804818c 0x00000005 (STRTAB) 0x804820c 0x00000006 (SYMTAB) 0x80481ac 0x0000000a (STRSZ) 78 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x8049760 0x00000002 (PLTRELSZ) 24 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x8048290 0x00000011 (REL) 0x8048288 0x00000012 (RELSZ) 8 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x8048268 0x6fffffff (VERNEEDNUM) 1 0x6ffffff0 (VERSYM) 0x804825a 0x00000000 (NULL) 0x0 make[2]: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper/tests' make: Leaving directory '/builddir/build/BUILD/hardening-wrapper-2.6/hardening-wrapper' Processing files: hardening-check-2.6-1.fc24.noarch Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.r9lwK0 Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.WRpZNo Provides: hardening-check = 2.6-1.fc24 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: /usr/bin/perl perl(Getopt::Long) perl(IPC::Open3) perl(Pod::Usage) perl(Symbol) perl(Term::ANSIColor) perl(strict) perl(warnings) Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386 make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. ../build-tree/hardened-cc syntax OK ../build-tree/hardened-ld syntax OK ../build-tree/hardened-c++ syntax OK /usr/bin/gcc -B ../build-tree/ -o ../build-tree/wrapper-test-stock hello.c /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-compiled hello.c /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-linked hello.c /usr/bin/ld.bfd -z relro -z now -plugin /usr/libexec/gcc/i686-redhat-linux/6.3.1/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/i686-redhat-linux/6.3.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccWxhMc7.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o ../build-tree/wrapper-test-linked /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crt1.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crti.o /usr/lib/gcc/i686-redhat-linux/6.3.1/crtbegin.o -L../build-tree -L/usr/lib/gcc/i686-redhat-linux/6.3.1 -L/usr/lib/gcc/i686-redhat-linux/6.3.1/../../.. /tmp/ccnoOKmO.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-redhat-linux/6.3.1/crtend.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crtn.o /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC-direct hello.c /usr/bin/ld.bfd -z relro -z now -plugin /usr/libexec/gcc/i686-redhat-linux/6.3.1/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/i686-redhat-linux/6.3.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccX2fPia.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o ../build-tree/wrapper-test-fPIC-direct /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crt1.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crti.o /usr/lib/gcc/i686-redhat-linux/6.3.1/crtbegin.o -L../build-tree -L/usr/lib/gcc/i686-redhat-linux/6.3.1 -L/usr/lib/gcc/i686-redhat-linux/6.3.1/../../.. /tmp/ccfigY4Q.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-redhat-linux/6.3.1/crtend.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crtn.o /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC.o -c hello.c /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -fPIC -O2 -o ../build-tree/wrapper-test-fPIC ../build-tree/wrapper-test-fPIC.o /usr/bin/ld.bfd -z relro -z now -plugin /usr/libexec/gcc/i686-redhat-linux/6.3.1/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/i686-redhat-linux/6.3.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cc2doFAD.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o ../build-tree/wrapper-test-fPIC /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crt1.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crti.o /usr/lib/gcc/i686-redhat-linux/6.3.1/crtbegin.o -L../build-tree -L/usr/lib/gcc/i686-redhat-linux/6.3.1 -L/usr/lib/gcc/i686-redhat-linux/6.3.1/../../.. ../build-tree/wrapper-test-fPIC.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-redhat-linux/6.3.1/crtend.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crtn.o /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-format-security format.c format.c: In function 'main': format.c:11:5: error: format not a string literal and no format arguments [-Werror=format-security] return fprintf(stderr, argv[0]); ^~~~~~ cc1: some warnings being treated as errors /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -Wno-format-security -o ../build-tree/wrapper-test-format-security format.c /usr/bin/ld.bfd -z relro -z now -plugin /usr/libexec/gcc/i686-redhat-linux/6.3.1/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/i686-redhat-linux/6.3.1/lto-wrapper -plugin-opt=-fresolution=/tmp/cc3Okq0n.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o ../build-tree/wrapper-test-format-security /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crt1.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crti.o /usr/lib/gcc/i686-redhat-linux/6.3.1/crtbegin.o -L../build-tree -L/usr/lib/gcc/i686-redhat-linux/6.3.1 -L/usr/lib/gcc/i686-redhat-linux/6.3.1/../../.. /tmp/ccg7A1f4.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-redhat-linux/6.3.1/crtend.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crtn.o /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-ssp-buffer-size-protect ssp-buffer-size-protect.c /usr/bin/ld.bfd -z relro -z now -plugin /usr/libexec/gcc/i686-redhat-linux/6.3.1/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/i686-redhat-linux/6.3.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccNOt0Mt.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o ../build-tree/wrapper-test-ssp-buffer-size-protect /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crt1.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crti.o /usr/lib/gcc/i686-redhat-linux/6.3.1/crtbegin.o -L../build-tree -L/usr/lib/gcc/i686-redhat-linux/6.3.1 -L/usr/lib/gcc/i686-redhat-linux/6.3.1/../../.. /tmp/ccFVYaR9.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-redhat-linux/6.3.1/crtend.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crtn.o /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -o ../build-tree/wrapper-test-ssp-buffer-type-protect ssp-buffer-type-protect.c /usr/bin/ld.bfd -z relro -z now -plugin /usr/libexec/gcc/i686-redhat-linux/6.3.1/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/i686-redhat-linux/6.3.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccCsXXRC.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o ../build-tree/wrapper-test-ssp-buffer-type-protect /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crt1.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crti.o /usr/lib/gcc/i686-redhat-linux/6.3.1/crtbegin.o -L../build-tree -L/usr/lib/gcc/i686-redhat-linux/6.3.1 -L/usr/lib/gcc/i686-redhat-linux/6.3.1/../../.. /tmp/ccPSYzJi.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-redhat-linux/6.3.1/crtend.o /usr/lib/gcc/i686-redhat-linux/6.3.1/../../../crtn.o /usr/bin/gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -B ../build-tree/ -O2 -c -o ../build-tree/wrapper-test-all.o hello.c ar: creating ../build-tree/wrapper-test-all.a /usr/bin/gcc -B ../build-tree/ -c -o ../build-tree/wrapper-test-none.o hello.c ar: creating ../build-tree/wrapper-test-none.a format.c: In function 'main': format.c:11:5: error: format not a string literal and no format arguments [-Werror=format-security] return fprintf(stderr, argv[0]); ^~~~~~ cc1: some warnings being treated as errors ar: creating ../build-tree/includes-test-all.a ar: creating ../build-tree/includes-test-none.a + exit 0 + umask 022 + cd /builddir/build/BUILD + cd hardening-wrapper-2.6 + DOCDIR=/builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/doc/hardening-check + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/doc/hardening-check + cp -pr hardening-wrapper/TODO /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/doc/hardening-check + cp -pr hardening-wrapper/debian/README.Debian /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/doc/hardening-check + cp -pr hardening-wrapper/debian/changelog /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/doc/hardening-check + exit 0 + umask 022 + cd /builddir/build/BUILD + cd hardening-wrapper-2.6 + LICENSEDIR=/builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/licenses/hardening-check + export LICENSEDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/licenses/hardening-check + cp -pr hardening-wrapper/AUTHORS /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/licenses/hardening-check + cp -pr hardening-wrapper/debian/copyright /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386/usr/share/licenses/hardening-check + exit 0 Wrote: /builddir/build/RPMS/hardening-check-2.6-1.fc24.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.L95P0M + umask 022 + cd /builddir/build/BUILD + cd hardening-wrapper-2.6 + /usr/bin/rm -rf /builddir/build/BUILDROOT/hardening-wrapper-2.6-1.fc24.i386 + exit 0 Child return code was: 0