pwndbg/.dockerignore

17 lines
485 B
Plaintext
Raw Normal View History

# venv
.venv/
Bringt back Archlinux CI. Fixes #1772, closes #1783 (#1800) * Only run arch for testing * Remove outdated arch repo * Actually build the docker image * Do not include site packages in sys.path * Ignore `.relr.dyn` section; skip lines w/o spaces Newer binaries can contain a `.relr.dyn` section to compress `R_X86_64_RELATIVE` relocation entries. These binaries can be found for example on archlinux but also on Debian 12 for example. `readelf` prints the content of the section similarly to this: ``` Relocation section '.relr.dyn' at offset 0x25220 contains 35 entries: 1198 offsets 00000000001ce8d0 00000000001ce8e0 ``` Compared to `00000000001d2000 0000000000000025 R_X86_64_IRELATIVE 9f330` for `.rela.plt`. Pwndbg now chokes on the new format because it expects a space seperator where there is none. It might be, that this is actually an upstream problem with binutils, because llvm-readelf prints this: ``` Relocation section '.relr.dyn' at offset 0x25220 contains 1198 entries: Offset Info Type Symbol's Value Symbol's Name 00000000001ce8d0 0000000000000008 R_X86_64_RELATIVE 00000000001ce8e0 0000000000000008 R_X86_64_RELATIVE ``` Nevertheless, we aren't actually interested in `R_X86_64_RELATIVE` relocations so I guess it's fine to just skip all lines that contain no spaces at all. `.relr.dyn` can only containt `R_X86_64_RELATIVE` relocations as far as I understand https://maskray.me/blog/2021-10-30-relative-relocations-and-relr * Accept Full RELRO in test Archlinux has libc and ld with Full RELRO. We now just accept Partial and Full RELRO. * Do not copy binaries from host to docker The `Dockerfile` copies the whole pwndbg folder to the image. If we have built binaries on the host before, these binaries will contain references to the host system and *copied* to the image. If we now run `context code` (inside docker) to have a look at the source code this will fail, because we will try to refer to a path on the host system. * Do not use loop index after loop Do not use loop index after the loop. The tests assumed that the loop in line 186 would run at least once, thereby *resetting* `i` to zero. If we never enter the loop, `i` will *continue* to have the value it had at the end of line 172. This will cause the test to fail in mysterious ways because `i` is now not reset to zero but still has the value `31` for example. The solution is to never use `i` outside of a loop. * Re-enable archlinux and temporarily disabled ones
2023-07-17 03:51:41 +08:00
# ignore binaries that are potentially tainted by the host system
# E.g. the binary could reference source code on the host system
# this is a problem because inside docker we won't have access to
# the host system
tests/**/binaries/*.o
tests/**/binaries/*.out
tests/**/binaries/gosample.x*
tests/**/binaries/div_zero_binary/core
tests/**/binaries/div_zero_binary/binary
!tests/**/binaries/*.go
# ignore QEMU test images (could also be tainted)
tests/qemu-tests/images