public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/107971] New: linking an assembler object creates an executable stack
@ 2022-12-05  9:07 contact@alexander-pick.com
  2022-12-05  9:19 ` [Bug c/107971] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: contact@alexander-pick.com @ 2022-12-05  9:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107971

            Bug ID: 107971
           Summary: linking an assembler object creates an executable
                    stack
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: contact@alexander-pick.com
  Target Milestone: ---

Created attachment 54011
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54011&action=edit
simple testcase for the issue

I encountered a strange behavior with gcc and linking an assembler object.
Doing so will create a binary with executable stack. A testcase is attached.

The code will compile a very simple assembler file as an object and link it to
an object compiled from C. The binary will have an executable stack by default
which isn't that great from a security point of view. Setting "-z noexecstack"
as a workaround is the only way to prevent this.

31:   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**4
32-         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rwx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-05 12:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-05  9:07 [Bug c/107971] New: linking an assembler object creates an executable stack contact@alexander-pick.com
2022-12-05  9:19 ` [Bug c/107971] " pinskia at gcc dot gnu.org
2022-12-05  9:21 ` pinskia at gcc dot gnu.org
2022-12-05  9:58 ` pinskia at gcc dot gnu.org
2022-12-05 10:22 ` contact@alexander-pick.com
2022-12-05 12:45 ` amonakov at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).