Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2023 13:34:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 273929] AArch64 machine-dependent code clobbers X0 in SIGTRAP from capsicum violations
Message-ID:  <bug-273929-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273929

            Bug ID: 273929
           Summary: AArch64 machine-dependent code clobbers X0 in SIGTRAP
                    from capsicum violations
           Product: Base System
           Version: CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: theraven@FreeBSD.org

X0 is used as both the first argument register and as the return value.  If
SIGTRAP is delivered to a process for a Capsicum violation, the mcontext_t =
in
the signal should contain the arguments so that software can trap and emula=
te
the system calls.  This works on x86[-64] but on AArch64 X0 is overwritten
before the system call handler is entered.  When emulating `open`, for exam=
ple,
the signal frame always sees the path as `(char*)94`, which makes this
impossible.

It would be nice if this could be fixed before 14.0 or be subject to an EN
afterwards, since it makes capsicum trap-and-emulate behaviour unusable
currently.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-273929-227>