virtiofs: FUSE conn_error on Linux 6.12+ due to ALLOW_IDMAP without POSIX_ACL
维护者通常 3 天内回复
还没有人认领这个 Issue。
- #584 来自 @JAORMX —— 已关闭,未合并
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- linux, rust
调研方向
Read src/devices/src/virtio/fs/server.rs and inspect how the FUSE_INIT response flags are assembled, especially the supported flags and the passthrough init() result. The issue identifies the macOS passthrough mismatch; verify the flag behavior against the Linux 6.12+ requirement described here. Done means the response no longer advertises an incompatible flag combination and virtiofs file operations work after mounting.
由索引模型根据 Issue 内容生成。
描述
Summary
On Linux 6.12+ guests, virtiofs mount succeeds but all subsequent file operations return ECONNREFUSED. The root cause is that server.rs advertises FUSE_ALLOW_IDMAP in the FUSE_INIT response without also advertising FUSE_POSIX_ACL.
Root Cause
Linux 6.12 added FUSE_ALLOW_IDMAP support (idmapped FUSE mounts). In fs/fuse/inode.c:process_init_reply, the kernel requires default_permissions (which is only set when FUSE_POSIX_ACL is in the response flags) when FUSE_ALLOW_IDMAP is present:
if (flags & FUSE_ALLOW_IDMAP) {
if (fc->default_permissions)
fm->sb->s_iflags &= ~SB_I_NOIDMAP;
else
ok = false; // ← sets conn_error = 1
}
libkrun's src/devices/src/virtio/fs/server.rs (added by #456) includes ALLOW_IDMAP in supported flags but does NOT include POSIX_ACL. The macOS passthrough's init() returns only WRITEBACK_CACHE | SUBMOUNTS. So the computed response flags include ALLOW_IDMAP but not POSIX_ACL, triggering the kernel's conn_error = 1.
With conn_error set, all subsequent FUSE requests return ECONNREFUSED without being sent through the virtqueue, so the FUSE worker only ever sees the FUSE_INIT request.
How to Reproduce
- Use libkrun v1.17.0+ on macOS (Apple Silicon)
- Boot a Linux 6.12+ kernel (e.g., Docker Desktop's LinuxKit kernel 6.12.72)
- Add a virtiofs device with
krun_add_virtiofs() - In the guest:
mount -t virtiofs <tag> /mntsucceeds ls /mntreturnsConnection refused(ECONNREFUSED)
Suggested Fix
Either:
- Remove
ALLOW_IDMAPfromsupportedflags when the passthrough filesystem doesn't support POSIX ACLs (macOS passthrough) - Add
POSIX_ACLtosupportedflags alongsideALLOW_IDMAP(requires the passthrough to actually implement POSIX ACL support)
The first option is simpler and correct since the macOS passthrough doesn't support POSIX ACLs.
Environment
- libkrun: v1.17.4 (Homebrew, macOS arm64)
- Host: macOS 15 (Apple Silicon)
- Guest kernel: Linux 6.12.72-linuxkit (Docker Desktop)
- FUSE API: 7.41
Debug Evidence
With KRUN_LOG_LEVEL_DEBUG, only one FUSE request is processed:
[devices::virtio::fs::worker] Fs: queue event: 1
[devices::virtio::fs::server] opcode: 26 # FUSE_INIT — the only request ever received
[devices::virtio::mmio[fs]] interrupt: signal_used_queue
No subsequent FUSE requests (LOOKUP, GETATTR, READDIR) arrive at the worker.
- 主要语言
- Rust
- 星标
- 2.8k
- 派生
- 279
- 平均合并
- 5 天 19 小时
- 30 天内合并 PR
- 48
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
libkrun/libkrun 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 3 天内回复
-
virtio/fs/windows: the owner, mode and xattrs of a symlink are read and written on its target (CVE-2026-135101)可能已有人在做 @nuri-yoo 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 20/100
维护者通常 3 天内回复
-
virtio/fs/windows: rename and link act on another entry when a name ends in a dot or a space (CVE-2026-135102)可能已有人在做 @nuri-yoo 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
维护者通常 3 天内回复
-
难度 4/5 1-2 天 新手友好度 52/100
维护者通常 3 天内回复
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
marketing
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
difficulty: easy docs help wanted tooling
难度 2/5 1-3 小时 新手友好度 83/100
-
bug help wanted ui
难度 2/5 1-3 小时 新手友好度 85/100
userFRM/egui-charts#4386 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
eliasstravik/herdr-projects#1605 · 1 条评论 ·