DashboardopencodeReadMsgUnix MSG_CTRUNC cleanup

ReadMsgUnix MSG_CTRUNC cleanup

Category: gotcha
Confidence: 1.00
ID: 01a0802b-e7f9-79d9-b313-07382f6dc3b9
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 1
Source session: 0OJYWmHUobcuQ4y8f
Created: 2026-09-08 05:28:47
Updated: 2026-09-08 08:39:16

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 1 5d ago

Content

Trap: returning immediately on MSG_CTRUNC looks safest, but Linux may install the descriptors that fit while closing only excess descriptors; repeated malformed START frames can exhaust the root process fd table. Fix: use MSG_CMSG_CLOEXEC, parse and record received descriptors before handling truncation, enforce the fd ceiling, and close every accumulated descriptor on every rejection path.

Move to: