This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/87875] Address sanitizer doen't work with nested functions with enabled stack-use-after-return check
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 05 Nov 2018 10:56:07 +0000
- Subject: [Bug sanitizer/87875] Address sanitizer doen't work with nested functions with enabled stack-use-after-return check
- Auto-submitted: auto-generated
- References: <bug-87875-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87875
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #5)
> (In reply to Martin Liška from comment #4)
> > Created attachment 44956 [details]
> > Patch candidate
> >
> > @Jakub: What do you think about the suggested patch? May I attempt to
> > mainline it?
>
> No, see above, that is not a good idea from security POV.
> You want to do that only if the real stack is executable.
> Dunno whether one should e.g. parse /proc/self/maps and find the stack in
> there, check the protection flags.
I see. So this one should be done at the place where a fake stack is created
(mmapped), right?