Skip to content

builtin route does not validate failed input redirects: echo hi < /dev/fd/63 (bad fd) executes silently with rc=0 where GNU suppresses execution with rc=1 #1968

Description

@caomengxuan666

来源

RC 审计第二阶段新发现 N2(~/workspace/rc-150/audit2/REPORT.md,当前尖 fa17033)。

分歧

echo hi < /dev/fd/63(坏 fd)与 <> 同形:rubash rc=0 静默照常执行并产出;GNU 在重定向失败时抑制执行、rc=1。根因面:echo 路由不校验输入重定向成败(内建路由的 redirect 失败处置与 GNU 的 fatal-redirect 语义脱节)。

归宿

重定向失败处置批(与 #1963 同批相邻):内建路由逐个核对重定向失败时的执行抑制与 rc,回归钉覆盖 echo/read 等代表内建 × 坏 fd/合成目标,断言 rc 与无产出。

Activity

  1. added
    bug
    gnu-baseline
    P2-medium
    area:fd
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2-mediumarea:fdbuggnu-baseline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions