Skip to content

dynamic-fd here-string reads leak a 0x1D control byte into values (exec {fd}<<<, mapfile/readarray -u) #399

Closed

Description

@caomengxuan666

Summary

Reads served from a dynamic-fd here-string (exec {fd}<<<alpha) leak a literal 0x1D control byte into the read value. The same leak appears in mapfile/readarray -u output.

Reproducers (probe wt37-374 K011-K013, K099, K111, K100)

exec {fd}<<<alpha; read -u $fd value; printf 'x=%s\n' "$value"; exec {fd}<&-
mapfile -tu 3 arr 3<<<$'alpha\nbeta'; echo ${#arr[@]} ${arr[@]}
exec {fd}<<<alpha; cat <&$fd

WSL GNU Bash 5.3.0: x=alpha / 2 alpha beta / alpha + newline.
rubash CLI: x=\x1dalpha / 2 \x1dalpha beta / \x1dalpha (leading 0x1D byte, od-verified).

Carrier-byte area (AGENTS.md highest-risk); likely a leftover internal marker in the here-string fd buffer path.

GNU owner

execute_cmd.c here-string redirection; builtins/read.def fd read path.

Artifacts

target/issue-suites/results/wt37-374/run/K011.* K012.* K013.* K099.* K111.* K100.*

Activity

  1. added
    bug
    on Oct 2, 2026
  2. added 2 commits that reference this issue on Oct 2, 2026
  3. caomengxuan666 commented on Oct 3, 2026

    @caomengxuan666
    MemberAuthor

    Landed on master through the wt38 pool recovery waves (CI green on the batch head); see the issueNNN regression suite and the lane matrices on the ticket trail. Carrier-domain #399 landed with the full true-baseline A/B held byte-identical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions