[Bug 239894] security.bsd.stack_guard_page default causes Java to crash
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Aug 28 10:35:27 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239894
--- Comment #16 from Konstantin Belousov <kib at FreeBSD.org> ---
(In reply to Greg Lewis from comment #15)
To check that PROC_STACKGAP_CTL helps, please build kernel and world (or just
usr.sbin/proccontrol) with D21352 applied. Then you can run unmodified java
binary like that:
$ proccontrol -m stackgap -s disable java <args>
and stack overflow detection should work same as before stack clash fixes.
It if works, the best route would be to add procctl(PROC_STACKGAP_CTL, DISABLE)
call at the beginning of the java vm initialization.
WRT future work, I might add some code to outguess the need of the procctl(2),
disabling gaps if mappings/mprotects are detected to fall into the gap area to
probably catch overflows. I am not big fan of this approach because it
effectively disables clash protection, which is the reason why I did not
implemented that already.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list