unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#11398: 24.0.95; Segfault in unexec on Linux 3.3* with grsecurity/PaX
@ 2012-05-03  9:12 Ulrich Mueller
       [not found] ` <handler.11398.B.133603645729820.ack@debbugs.gnu.org>
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Ulrich Mueller @ 2012-05-03  9:12 UTC (permalink / raw)
  To: 11398

Forwarding downstream bug <https://bugs.gentoo.org/411439>.

Emacs 23.4 and 24.0.95 both fail to build on a Gentoo system with a
sys-kernel/hardened-sources-3.3* kernel, i.e. Linux 3.3* with the
grsecurity/PaX patches from <http://grsecurity.net/>
(e.g., grsecurity-2.9-3.3.4-201204272006.patch).

   Dumping under the name emacs
   **************************************************
   Warning: Your system has a gap between BSS and the
   heap (15045480 bytes).  This usually means that exec-shield
   or something similar is in effect.  The dump may
   fail because of this.  See the section about
   exec-shield in etc/PROBLEMS for more information.
   **************************************************
   make[1]: *** [bootstrap-emacs] Segmentation fault
   make[1]: Leaving directory `/var/tmp/portage/app-editors/emacs-23.4-r1/work/emacs-23.4/src'
   make: *** [src] Error 2

Since it still could be successfully built with hardened-sources-3.2*,
we had first reported this problem to grsecurity/PaX upstream.
However, they claim that it is due to a bug in Emacs' unexec code.

Quoting from <https://bugs.gentoo.org/show_bug.cgi?id=411439#c13> and
following comments:

| i've debugged the problem and it's a bug in emacs. it wants to create
| a memory dump of its address space without actually looking at what
| memory ranges are available with what access rights. due to recentish
| changes in PaX the gap between the end of the main executable's data
| section and the start of the brk heap is mapped with PROT_NONE rights,
| so no access is allowed and this is where emacs fails.

| ADDR_NO_RANDOMIZE was added as a workaround to fix userland bugs
| like what emacs has (the first bug is about assuming a particular
| address space layout that no standard has ever guaranteed, the
| second bug is that emacs doesn't use the kernel provided interface
| to discover its own address space layout).

| [...] fundamentally a bug in emacs's memory dumper code, the proper
| fix should be in there.

Could GNU Emacs upstream comment on this, please?

Ulrich





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

end of thread, other threads:[~2019-08-28 14:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03  9:12 bug#11398: 24.0.95; Segfault in unexec on Linux 3.3* with grsecurity/PaX Ulrich Mueller
     [not found] ` <handler.11398.B.133603645729820.ack@debbugs.gnu.org>
2012-05-17 21:13   ` bug#11398: Acknowledgement (24.0.95; Segfault in unexec on Linux 3.3* with grsecurity/PaX) Ulrich Mueller
2012-05-17 21:16     ` Glenn Morris
2012-05-27 12:18   ` bug#11398: 24.0.95; Segfault in unexec on Linux 3.3* with grsecurity/PaX Ulrich Mueller
2012-06-03 23:15     ` Glenn Morris
2012-06-27  9:00 ` Herbert J. Skuhra
2012-06-27 23:59   ` Glenn Morris
2019-08-28 13:52 ` Stefan Kangas
2019-08-28 14:24   ` Ulrich Mueller
2019-08-28 14:27     ` Stefan Kangas
2019-08-28 14:51   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).