[GHC] #12657: GHC and GHCi: RWX mmap denied by GrSec, results in a segfault

GHC ghc-devs at haskell.org
Mon Oct 24 18:28:48 UTC 2016


#12657: GHC and GHCi: RWX mmap denied by GrSec, results in a segfault
-------------------------------------+-------------------------------------
        Reporter:  PoroCYon          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Runtime System    |              Version:  8.0.1
      Resolution:                    |             Keywords:  grsec, pax,
                                     |  mmap, rts
Operating System:  Linux             |         Architecture:  x86_64
                                     |  (amd64)
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by pumpkin):

 Replying to [comment:6 simonmar]:
 > The linker should mmap RW during linking and them remap RX when linking
 is complete.  I think the new m32 allocator will make things a more
 difficult though, because it maintains partial pages of linked code, and
 we can't remap one of those pages from RX to RW since it might already be
 in use.

 I think grsecurity tracks writability history as well, so it forbids a
 page from being executable that was ever writable (by a given process)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12657#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list