RTFM_ security field notes

SUID and execution identity

Understand effective identity and execution conditions before treating a mode bit as an exploitable path.

The set-user-ID mode bit concerns the effective identity used when a program is executed. It is not itself a finding: a privileged program can deliberately expose a narrow, correctly enforced operation.

What the bit changes

For an applicable executable, Linux changes the effective user ID to the file owner’s identity during execve(). This is different from assuming that every subsequent action will run with unrestricted system privileges. execve

The same manual identifies conditions that suppress the change, including no_new_privs, a filesystem mounted nosuid, and tracing. Linux also ignores set-user-ID and set-group-ID bits on interpreter scripts. execve

Inspect one candidate in context

For a file already approved for local inspection, a metadata query can describe its owner and mode without executing it:

stat -- /path/to/candidate

This is an illustrative command, not permission to inspect or execute anything on an engagement. Record the file identity, filesystem context, and the source of the observation. A mode listing alone does not establish the runtime identity or which inputs a program will trust.

Why command lookup can matter

A privileged program that delegates work using an attacker-influenced search path may cross an unintended trust relationship. The hypothesis requires binary-specific evidence: the lookup actually occurs, the relevant search location is controllable, and privilege is still present at that operation.

Do not turn “a relative command name appeared” into “arbitrary privileged execution confirmed.” A program may constrain its environment or drop privileges. This guide contains no replacement payload or execution procedure.

Bound the conclusion

Distinguish an interesting file, a supported unsafe dependency, and an observed impact. Failure under one mount or process policy is a contextual negative, not a statement about every deployment of that program.

Sources and adaptation

linux-execve — Linux man-pages, execve(2), description and versions sections read 2026-11-20.

rtfm-legacy-suid — 4_systeme/1_linux/privesc/suid.md. The original enumeration and search-path example are recast as an explanation with explicit missing conditions; no privileged replacement script is copied.

Provenance and confidence
Version
1
Sources reviewed
2026-11-20
Confidence
medium — Execution semantics reviewed against Linux execve(2); no binary-specific privilege path was reproduced.

Also searched as: suid, setuid, abus suid, élévation de privilèges