Skip to content

信任条件 (a) 理论误触:同词 glue 落他字时引号内 IFS 空白未受保护仍被判可信(#3089 返工面外观察) #3263

Closed

Description

@caomengxuan666

现象(理论面,PR #3262 返工车道 §8.6 观察)

#3089 修法中判词信任条件 (a)「标记展开带保护载体」理论上可被误触:mark_literal_ifs_chars 对词中其他字符落下 IFS_GLUE 载体时,同一词内引号包裹的 IFS 空白并未受保护,条件 (a) 仍可能判定该词可信,从而在文本门回落口径下误判字段切分。

定位

  • 观察出处:~/workspace/fix-W-3089/REPORT.md §8.6(返工车道面外观察,未动代码)。
  • 根除方向:把「仿真复现信号」从 command_prepare.rs 传出到判词点,使信任判定基于逐词的实际保护状态而非存在性启发——属结构传导,非单点补丁。

归宿

1.5.1 派单:先构造可复现探针坐实(当前为理论推演,无实测红格),坐实后按结构传导修;若探针证伪则带证据关单。不得以个案形状打补丁。

Activity

  1. added this to the 1.5.1 milestone on Nov 10, 2026
  2. added
    bug
    gnu-baseline
    on Nov 10, 2026
  3. caomengxuan666 commented on Nov 11, 2026

    @caomengxuan666
    MemberAuthor

    按用户 2026-11-11 令,队长未完工的 rubash 队列整体移交 Uarz,本单 assignee 改为 Uarz。

    规矩见置顶单 #3341:assignee 即认领;先对照 GNU bash 5.3 源码定语义(引 file:line)再修、按机制修不打地鼠;每个修复带仓内回归钉并给出 fail-first 证据;第一笔提交即开 draft PR;不自合、不自关;正文 Fixes/Refs 口径与同句误关单纪律照 #3341。开工前先查本单是否已有 open PR 覆盖,有则先审 PR、不另起实现。

  4. caomengxuan666 commented on Nov 12, 2026

    @caomengxuan666
    MemberAuthor

    开工:队长车道临时接手(Uarz 休息期间)。先在现 master 上复现该理论误触并以探针固定;若无法复现或证伪,带证据停手交回,不硬修。

  5. caomengxuan666 commented on Nov 20, 2026

    @caomengxuan666
    MemberAuthor

    CAPTAIN probe verdict: CONFIRMED — the condition-(a) false trigger is real

    A captain probe lane (2026-11-20) tested the theoretical false-trigger against the GNU bash 5.3.20 oracle with 124 script-file probes over five rounds (round 5's supplementary controls were not retrieved due to host load; rounds 1–4 are decisive). The heuristic existence check is empirically broken.

    Minimal repro

    IFS=': '
    V=
    W=
    : > ${W:-'}'}:'a:b'
    echo "rc=$?"
    • GNU bash 5.3.20: rc=0, creates }:a:b (one field).
    • rubash (pristine master ff966865): rc=1, ${W:-'}'}:'a:b': ambiguous redirect, no file.

    Three elements are jointly necessary, each established by ablation: (1) a quote-containing ${...} span before the quoted IFS segment; (2) a literal IFS character between span and segment carrying IFS_GLUE from mark_literal_ifs_chars (the : here) — replacing it with a non-IFS char (R1) or removing it (M4) makes both sides agree; (3) the quoted IFS segment whose protection depends on the simulation record. 13 shapes in the family confirmed, including the issue's literal quoted-blank form (R4). Position matters: the same span after the segment, or glue before the span, does not trigger.

    Loci

    Verdict: expand_redirect_target in src/executor/expand_word.rs (condition (a) is the whole-string existence check over IFS_GLUE/ANSI_C_IFS_GUARD). Glue channel: mark_literal_ifs_chars (command_prepare.rs), unconditional, quote-blind. Simulation channel: mark_quoted_ifs_from_raw (same file) with its equality guard; whether the loss is the guard bailing or a position-record offset under "span first + intervening glue" is left for the fix lane to settle by instrumentation (the suffix-position controls exclude an unconditional-bail model).

    Captain's ruling

    Probes ran on cloud against the oracle (5.3.20(1)-release) and a build verified file-identical to pristine ff966865 on all five relevant sources.

  6. added a commit that references this issue on Nov 21, 2026
    38eb719
  7. caomengxuan666 commented on Nov 21, 2026

    @caomengxuan666
    MemberAuthor

    CAPTAIN-VERIFY(PR #4073 合入,merge commit eb39c97f)

  8. added a commit that references this issue on Nov 21, 2026
    eb39c97
  9. added a commit that references this issue on Nov 30, 2026
    3ef1895
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggnu-baseline

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions