Handle ELF binary with no program segments
Do not return False for NX and No for RELRO when there is no program segments in the ELF binary file (e.g. kernel module).
This is inspired from https://github.com/slimm609/checksec/commit/29aea688e10b5c16d1cf60e3968f170b2147c150
For RELRO, a new NA value is added
For NX, True is returned to avoid changing NX type from boolean to string
relro_na will have to be added to tests/binaries/elf to fix tests
Hi @ffontaine and thanks for this PR.
Could you provide a test binary and make a PR into https://github.com/Wenzel/checksec.py-test-binaries ?
Hi, PR created: https://github.com/Wenzel/checksec.py-test-binaries/pull/2
@ffontaine just merged your test binary can you update the submodule here ?
Done
Thanks ! can you make the CI go green ? :green_circle:
I sent a new PR as pytest does not handle link on usb-storage.ko: https://github.com/Wenzel/checksec.py-test-binaries/pull/3
CI is finally green :-)