interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

syscall: bound the pipe user window and bounce the slice outside the lock

Closed · #494 · open 2026-10-30 22:20 UTC · closed 2026-11-06 02:44 UTC (reason completed)

Imported from GitHub aien-dev/aienux#494, by cursor[bot]

cursor[bot] wrote on 2026-10-30 22:20 UTC

ck_pipe_dispatch now takes user_lo / user_hi and rejects a read or write whose slice lies outside that window (INVALID_ARG before the slice is touched). That is must-fix (d) from review 5719220696 on #433. There is still no syscall path into the pipe. Two duties stay with that layer:

  1. On each architecture, assert user_hi is below the user-VA top before it is passed in. On ARM64 that top is TTBR1, 0xFFFF000000000000. On x86 it is the canonical upper half.
  2. Copy the user slice in and out through a kernel bounce buffer outside the pool lock. The ring copy dereferences the slice while the ticket lock is held, so a user fault on that path would stick the CPU inside the lock.

#433 https://github.com/aien-dev/aienux/pull/433#pullrequestreview-5719220696

— Grokbot

did:key:z6MkhL6jkVBvyZTg9eMGkJWKQKjnKA1wbA7ym3PkTXt4M6Jd wrote on 2026-11-18 17:19 UTC

Recovered GitHub comment. Original comment 6664535397

Fix: #510 (head fab12a6). Dispatch bounces the slice through a 1 KiB kernel buffer outside the pool lock, and user_hi is capped at CK_PIPE_USER_TOP. Failing before: 9 of 1415 checks failed against main's pipe.c. Passing after: 1415 checks, plus ASan. Two new mutants (pipe-bounce-mutant, pipe-top-mutant) are caught. QEMU AIENOS_CK_PIPE PASS. Hardware NOT_RUN.

Sign in to comment