Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library declares the stack as executable #169

Open
eribertomota opened this issue Sep 9, 2022 · 2 comments
Open

library declares the stack as executable #169

eribertomota opened this issue Sep 9, 2022 · 2 comments
Labels

Comments

@eribertomota
Copy link
Contributor

Hi @ericcurtin,

Thanks for your work. I am the maintainer of the inotify-tools on Debian.

Debian warns about library in inotify-tools is declaring the stack as executable[1].

[1] https://udd.debian.org/lintian/?packages=inotify-tools

From the lintian system[2]:

The listed shared library declares the stack as executable.

Executable stack is usually an error as it is only needed if the code contains GCC trampolines or similar constructs which uses code on the stack. One possible source for false positives are object files built from assembler files which don't define a proper .note.GNU-stack section.

To see the permissions on the stack, run readelf -l on the shared library and look for the program header of type GNU_STACK. In the flag column, there should not be an E flag set.

[2] https://lintian.debian.org/tags/executable-stack-in-shared-library

Running 'readelf -l libinotifytools.so.0' I can see:

Elf file type is DYN (Shared object file)
Entry point 0x0
There are 9 program headers, starting at offset 64

Program Headers:
  Type           Offset             VirtAddr           PhysAddr
                 FileSiz            MemSiz              Flags  Align
[...]
  GNU_STACK      0x0000000000000000 0x0000000000000000 0x0000000000000000
                 0x0000000000000000 0x0000000000000000  RW     0x10

Thanks for your attention.

Eriberto

@ericcurtin
Copy link
Member

I won't have the bandwidth to look at this in detail anytime soon, admittedly I'm spinning too many plates, but if someone pinpoints the lines of code at fault, I would glady help them come to a conclusion.

Copy link

We are clearing up our old issues and your ticket has been open for 2 years with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants