https://www.undeadly.org/cgi?action=article;sid=20240222183703 Front page [ ] [Search site] OpenBSD Journal Home Archives About Submit Story Create Account Login New code for SIGILL faults help identify misbranches Contributed by Janne Johansson on 2024-02-22 from the don't pee on the electric fence dept. If you run recent OpenBSD on certain amd64 or aarch64 platforms, indirect branching to an "unexpected" location will crash your program, in order to prevent ROP attacks and similar ways to have your program execute code where it shouldn't. The OpenBSD compiler will insert an extra instruction in all the places where a branch is supposed to land, and if it lands anywhere else, a CPU fault is raised and your program gets an "Illegal Instruction". Previously, crashes of this kind have looked more or less like any other kind of fault where code is executing random data or from random locations, but since the kernel knows when this has happened, we can make it explicit that the fault is due to missing branch target instructions, which will help a lot when debugging. Link to the commit here. Reply --------------------------------------------------------------------- Latest Articles * Thu, Feb 22 + 18:37 New code for SIGILL faults help identify misbranches (0) * Sun, Feb 18 + 14:22 OpenBSD -current moves to 7.5-beta (0) + 14:17 New wi-fi driver, qwx(4), enabled in -current (0) * Wed, Feb 14 + 07:10 rpki-client 8.9 released (0) + 07:05 Game of Trees 0.96 released (0) * Sun, Feb 04 + 11:29 Soft updates (softdep) support removed from -current (29) * Mon, Jan 29 + 06:01 pinsyscalls(2) work summarized by Theo de Raadt (0) * Thu, Jan 25 + 06:44 KMS for Apple silicon machines (0) * Thu, Jan 18 + 08:07 pinsyscalls(2) working in anger (1) Credits Copyright (c) 2004-2008 Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to April 2nd 2004 as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]