# Execve GPF panic — 2026-09-12

**Submission status:** prepared locally; not submitted. The copyable draft below
covers only September 12. Original analysis follows under **Investigation notes**.

## How to submit upstream

1. Search [FreeBSD Bugzilla](https://bugs.freebsd.org/bugzilla/query.cgi) for
   `kern_execve`, `general protection fault`, and `fdcloseexec`. The last term is
   a search aid, not an established fault location. Check possible duplicates;
   no complete duplicate search is claimed here.
2. Create/sign in to an account and open
   [New Base System bug](https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Base%20System).
3. Use the proposed fields below, paste the draft description, and attach the
   two focused text files below as `text/plain`, with the patch box unset.
4. Review public content, submit, save the PR URL here, and answer follow-up
   questions in that PR. Cross-reference the exit-panic PR if one is filed,
   explicitly saying that a common cause is unproven.

Sources: FreeBSD's [bug reporting page](https://www.freebsd.org/support/bugreports/)
and [report-writing guide](https://docs.freebsd.org/en/articles/problem-reports/),
checked 2026-12-02. The live form denied automated access earlier in this session;
confirm current choices and required markers when signed in. This table proposes
values rather than claiming a verified list of mandatory UI fields.

| Field | Proposed value |
|---|---|
| Product | Base System |
| Component/category | kern |
| Summary | Kernel GPF during execve in codex; fault RIP 0xffffffff80b22620 (15.1 amd64) |
| Version | 15.1-RELEASE if offered; explain likely `-p1` and subsequent `-p3` in Description |
| Hardware/platform | amd64 or equivalent x86-64 choice |
| OS | FreeBSD, if shown |
| Severity | Affects Only Me: one event on one host for this signature |
| Priority, assignee, CC, flags | Leave defaults; no specific maintainer identified |
| Description / Environment / Steps | Draft below; split only if separate fields exist |
| Reporter | A monitored email address; FreeBSD warns that it becomes public |

### Information to confirm or mark unknown

- Exact running kernel on September 12, install/update history, local patches,
  kernel config/debug options, and panic-time module list. A reboot can activate
  an already installed update; post-reboot version is not crash version proof.
- Codex process start time and executable version/hash. The September 6 package
  install does not prove a process that may predate it used that executable.
- Launch command, exec target/arguments, native or compatibility environment,
  jail context, and workload immediately before the crash. These are unknown.
- RAM size, hardware/memory test results, and recurrence on newer kernels.
  Hardware corruption has not been excluded; no successful regression test is
  recorded. Today's local GENERIC-DEBUG configuration is not September's.
- Source timezone and discrepancy between syslog labels and embedded kernel
  epoch values; timestamps below are preserved without normalization.

Unknowns can remain explicit when filing. Do not fill them with today's state.

## Copyable Bugzilla description

### Problem and impact

On September 12, 2026 (syslog label 16:16:54), one Intel N95 mini PC panicked
with a kernel-mode general protection fault while a process named `codex`, PID
17905, was executing the execve syscall path. The system immediately rebooted.
Uptime was 26d0h16m17s. This signature was observed once.

Expected: execve either succeeds or returns a normal error without panicking.
Actual: trap 9, CPU 2 / APIC 04, RIP `0xffffffff80b22620`.
The complete trap record, registers, and backtrace are attached.

```text
#0 kdb_backtrace+0x5d
#1 vpanic+0x136
#2 panic+0x43
#3 trap_fatal+0x68
#4 calltrap+0x8
#5 kern_execve+0x13a1
#6 sys_execve+0xb7
#7 amd64_syscall+0x126
#8 fast_syscall_common+0xf8
```

### Environment and boot provenance

Hardware: four-core Intel N95, amd64. The preceding preserved boot banner is:

```text
Aug 17 16:00:22 miniPC kernel: FreeBSD 15.1-RELEASE-p1 releng/15.1-n283582-0f691888dc56 GENERIC amd64
```

Its date is consistent with the panic uptime, so `-p1` is the likely running
kernel. The reboot after the panic instead logged:

```text
Sep 12 16:16:54 miniPC kernel: FreeBSD 15.1-RELEASE-p3 releng/15.1-n283611-88e7371d9dc2 GENERIC amd64
```

These boot excerpts are attached. Exact crash-binary identity is not established;
`-p3` must not be assumed merely because it booted afterward.

Package logs record `codex-0.151.0` installed September 6. The crashing process
may have started before that upgrade, so its version is probable, not proven.
Exact executable, execution environment, and exec target are unknown.

### Symbolization limits and observations

No vmcore exists; `/var/crash` contained only `minfree` when checked. The exact
September 12 kernel and debug symbols were not preserved. The available
September 21 baseline is a different layout and must not resolve this fault.

Specifically, baseline `kern_execve` starts at `0xffffffff80b326c0`; adding
`0x13a1` gives `0xffffffff80b33a61`. The original trace instead records
`0xffffffff80b33851`, a difference of `0x210`. A lookup of the fault RIP against
that baseline lands in `fdcloseexec`, but that attribution is invalid for the
crashed kernel. `kern_execve+0x13a1` is a backtrace return address, not the
identified faulting instruction.

The saved `rdx` is `0x04000000007fffff`, numerically equal to Capsicum
`CAP_ALL1`. Without the correct instruction and operand roles, this does not
establish pointer corruption or implicate capability code. A GPF can arise from
a non-canonical operand address, but the precise cause here is unknown.

### Reproduction, workaround, and request

No deterministic reproducer or exact triggering command was preserved. The
process was part of a Codex workload; later descriptor-heavy observations are
not measurements of this process at the panic. Local stress programs have not
reproduced this event and are not validated reproduction steps.

There is no confirmed workaround, patch, or result on a newer kernel. Separate
September 13/20 process-exit panics have a different fault RIP and backtrace;
a shared root cause is not established and they are reported separately.

Please advise whether the logged addresses and likely `-p1` revision permit
further symbolization, and what focused diagnostics to capture if this recurs.
No whole memory dump is available for this event.

## Evidence without uploading a whole core dump

For the initial submission, attach these files individually. Local relative
links will not resolve on Bugzilla.

| Attachment | Contents and provenance |
|---|---|
| [execve-gpf-panic-evidence.txt](execve-gpf-panic-evidence.txt) | Complete September 12 trap, registers, absolute trace addresses, embedded time, and uptime; extracted verbatim |
| [execve-gpf-boot-provenance.txt](execve-gpf-boot-provenance.txt) | Preceding August 17 and following September 12 boot banners, with original source filenames |

The report body supplies the baseline mismatch arithmetic. Keep the longer
analysis below for follow-up. Do not attach September 21 disassembly, `uname`,
or `kldstat` as though they described the September 12 running kernel. They can
be supplied on request with explicit post-crash provenance. Initially omit full
rotated logs, path-heavy process listings, unrelated patches, and untested POCs.

Review public attachments for hostnames, usernames, paths, network details,
and secrets. Preserve diagnostic registers and instruction addresses; label
redactions and retain unmodified originals locally.

### If another crash produces a dump

Retain the vmcore privately with the exact running kernel, modules, debug
symbols, build configuration, and hashes. Record running identity before any
reboot/update and keep it distinct from installed userland/kernel versions.
Ask the investigating developer for commands using those matching symbols to
extract:

- Full trap/register output, all-thread backtraces, and faulting disassembly.
- The exact faulting operand's value and a small relevant memory range.
- Exec/descriptor/capability state only as indicated by that instruction.

Review `core.txt`/crashinfo text before publishing; text can contain private
data too. A compressed dump or kernel minidump can still contain sensitive
memory. Arrange private transfer separately if a developer needs the dump.
Text-only evidence is useful for an initial report but may not identify the
root cause, especially without matching symbols or a reproducer.

---

## Investigation notes

**Class:** exec-path fault
**Event:** 2026-09-12 16:16:54
**Host:** miniPC
**Kernel:** likely FreeBSD 15.1-RELEASE-p1 (GENERIC), amd64; see boot provenance below
**Hardware:** 4-core Intel N95
**Process:** `codex`, PID 17905
**CPU:** 2 (apic id 04)
**Trap:** 9 — general protection fault in kernel mode
**Outcome:** kernel panic, immediate reboot
**Uptime at panic:** 26d 0h 16m 17s

This is the **separate** panic class. It does not share the faulting
instruction or exit-path backtrace of the Sep 13 / Sep 20 crashes. See
[`exit-mqueue-panic.md`](exit-mqueue-panic.md) for the other class and
[`README.md`](README.md) for the overall assessment.

---

## Raw record

```
Fatal trap 9: general protection fault while in kernel mode
cpuid = 2; apic id = 04
instruction pointer = 0x20:0xffffffff80b22620
stack pointer       = 0x28:0xfffffe014612f980
frame pointer       = 0x28:0xfffffe014612f9e0
code segment        = base 0x0, limit 0xfffff, type 0x1b
                    = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags    = interrupt enabled, resume, IOPL = 0
current process     = 17905 (codex)
rdi: 0000000000003300 rsi: fffffe00f77854f0 rdx: 04000000007fffff
rcx: fffffe00c1928560 r8: 0000000000000008  r9: fffff801a8d51c00
rax: fffffe01de697000 rbx: fffffe00f77854f0 rbp: fffffe014612f9e0
r10: 0000000000000000 r11: fffff8037484a550 r12: 0000000000003300
r13: 0000000000099000 r14: 000000000001a702 r15: fffff8037484a000
trap number         = 9
panic: general protection fault
```

Backtrace:

```
#0 kdb_backtrace+0x5d
#1 vpanic+0x136
#2 panic+0x43
#3 trap_fatal+0x68
#4 calltrap+0x8
#5 kern_execve+0x13a1
#6 sys_execve+0xb7
#7 amd64_syscall+0x126
#8 fast_syscall_common+0xf8
```

Full text:
[`panic-excerpts.txt`](panic-evidence-20260921.adypzQ/panic-excerpts.txt).

---

## What is known

- The fault occurred during an `execve` system call.
- `kern_execve+0x13a1` is a **return address**, not necessarily the faulting
  function. The faulting instruction pointer is `0xffffffff80b22620`.
- The fault is a general protection fault, so the faulting instruction most
  likely used a non-canonical address. No fault virtual address is recorded for
  a GPF.
- `rdx` contains `0x04000000007fffff`, exactly the Capsicum `CAP_ALL1` mask.
  This is the same value seen in `r14` in the Sep 20 exit panic, but here it is
  in a general argument register, so the connection is only suggestive.
- `rdi` and `r12` both contain `0x3300` (13,056). `r13` is `0x99000`
  (626,688). `r14` is `0x1a702` (108,290). These look like sizes, counts, or
  offsets, but their meaning is not established.

## Why this record cannot be symbolized from the preserved baseline

The September baseline `kernel.debug` has `kern_execve` at
`0xffffffff80b326c0`. If the logged backtrace frame `kern_execve+0x13a1` came
from that binary, the return address would be `0xffffffff80b33a61`. The log
records `0xffffffff80b33851`, a difference of `0x210`.

That mismatch proves the Sep 12 kernel layout differs from the September 21
baseline. The faulting IP `0xffffffff80b22620` therefore cannot be safely
resolved with the installed symbols. A naive lookup against the baseline puts
it inside `fdcloseexec`, but that result is **not valid** for the Sep 12
kernel and must not be treated as the faulting function.

This is why the original report said Sep 12 must be symbolized separately
against its own binary. That binary was not preserved.

---

## Interpretation

The record establishes:

- a kernel-mode GPF in a `codex` process during `execve`;
- a capability-rights-shaped value in `rdx`;
- a kernel build/layout different from the later baseline.

It does **not** establish:

- which function or instruction faulted;
- whether the corrupt value was a rights mask, a pointer, or unrelated data;
- whether the Sep 12 bug is the same as the Sep 13 / Sep 20 exit bug;
- whether this is one bug, a different bug, or external memory corruption.

A reasonable working statement is: **Sep 12 is a distinct exec-path failure
signature, possibly involving capability state, with an unknown root cause.**
The only strong link to the exit panics is the same process name and the
`CAP_ALL1` value; that is not enough to merge the classes.

## What would resolve it

- A preserved Sep 12 kernel binary or matching source revision.
- A vmcore with the faulting stack, registers, and memory around the faulting
  operand.
- The panic-time module list and `kldstat`.
- Symbolization of `0xffffffff80b22620` against the exact Sep 12 build.

None of those exist in this directory.

---

## Confidence

| Claim | Confidence |
|---|---|
| Kernel GPF during `execve` in `codex` | high |
| Faulting IP cannot be resolved with the preserved baseline | high |
| Sep 12 is a different signature from Sep 13/20 | high |
| Sep 12 shares a root cause with the exit panics | low / unproven |
| The `CAP_ALL1` value in `rdx` is meaningful | unknown |
