Skip to content

[bug] ls resolves bare / to the payload root - bypasses the #1274 shared argv boundary (inconsistent with every other tool) #1364

Closed

Description

@caomengxuan666

Repro (owner machine, current main)

$ ls.exe /
bin  dev  etc  init.err  opt  root  tmp  usr ...   ← the winuxcmd PAYLOAD root
                                                   (plus old test debris: init.err,
                                                    tmp_check_cr.txt, 192.1.0.186 ...)

while a Windows-native tool in the same shell resolves / to the drive root:

$ eza /                (ls is aliased to eza here)
repo  Program Files  Downloads  BaiduNetdiskDownload ...   ← the drive root

Two ls binaries in one install disagreeing on what / means.

Root cause

PR #1274 routed bare MSYS drive-root operands (/x, /x/) through the shared native_path argv boundary in every command that resolved operands OUTSIDE it - and the fix's own command list (strings/xxd/tsort/hmac256/expand/unexpand/column/xargs -a/stty -F/sync/getfacl/mktemp -p/env -C) does not include ls. ls.exe still resolves its operand with its own prefix logic, landing on the winuxcmd payload root (where its runtime tree lives) instead of the dialect-stable drive root.

Same defect class as #1288's RAW-USER-PATH sites - this one is about the bare-/ spelling specifically.

Expected

ls.exe / lists the same root the shared boundary defines for bare / (stable across cwd drives, consistent with ls / on the Windows-native side). Debris files in the payload root (init.err, tmp_check_cr.txt, 192.1.0.186) should additionally be swept regardless.

Notes

Activity

  1. added
    bug
    on Oct 26, 2026
  2. caomengxuan666 commented on Oct 26, 2026

    @caomengxuan666
    MemberAuthor

    范围重定(维护者裁定,2026-10-26):本条不再按「ls 对齐盘根」处置。

    裁定 = 飞地规则:裸 / 在全命令集统一解析为 payload 根。理由:(1) 管理员权限是产品红线——/ 落盘根并不会消灭 payload 树,usr/etc/tmp 仍要在盘根另建文件夹(受 ACL 限制、污染系统根),飞地只是搬家并多一层挂载/绑定架构;(2) AI 沙箱权限面更严峻——niu 的主场景是 AI agent 执行命令,绝对路径若直通全盘,agent 的写/删爆炸半径从用户领地扩到整机,基于路径的沙箱审批面随之爆炸。盘根只经 /c/ 式方言拼写进入;eza 等原生工具对 / 的盘符根解释是方言外固有边界(Git Bash 下同样存在),不作对齐目标。

    新范围:审计全部命令的裸 / 归宿——凡经 #1274 共享边界或自有逻辑把裸 / 解析到盘根的命令,即沙箱漏口,逐个改回 payload 根并钉回归;/c、/c/ 拼写行为不得变更。ls 的 payload 根行为本身符合飞地规则,其「绕过 #1274 边界」的家族内不一致随本次审计一并收口。裁定记录见主会话 DECISIONS(2026-10-26 #1364 根路径飞地规则裁定)。

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

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions