Dashboardinstitutional-transition-lab_read_regular_file O_NOFOLLOW

_read_regular_file O_NOFOLLOW

Category: gotcha
Confidence: 1.00
ID: 01a08491-a994-7574-b013-92ca49c7ec98
Project ID: 1fa3712f-997f-4884-b7ec-8abb79f9e342
Cross-project: No
Recalled in other projects: 0
Source session: 0k60TJeo0Lqvt0U3Z
Created: 2026-09-09 04:54:50
Updated: 2026-09-09 05:08:53

Content

Trap: O_NOFOLLOW looks like complete symlink rejection, but it protects only the final component; symlinked parent directories remain traversable, while getattr(os, "O_NOFOLLOW", 0) silently disables protection when unavailable. Fix: traverse components relative to bound directory descriptors with no-follow checks, reject symlinked parents, and fail before opening when the required primitive is unavailable.

Move to: