RUSTSEC-2026-0486: xattr functions mark unwritten bytes as initialized when given a zero-length buffer
还没有人认领这个 Issue。
评估
调研方向
先检查项目实际解析的 rustix 版本:在 Cargo.toml 和 Cargo.lock 中查找 rustix,并运行 cargo tree -i rustix。公告指出 1.1.6 是修复版本,因此可能的改动是升级依赖,例如 cargo update -p rustix,也可能需要修改清单文件。运行 cargo build 和 cargo test,然后确认锁文件中的 rustix 为 1.1.6 或更高版本。
由索引模型根据 Issue 内容生成。
描述
xattr functions mark unwritten bytes as initialized when given a zero-length buffer
| Details | |
|---|---|
| Status | unsound |
| Package | rustix |
| Version | 1.1.4 |
| URL | https://github.com/bytecodealliance/rustix/commit/8e6aaa6713d2bb64b1fdd8c472e3a32a10a76d70 |
| Date | 2026-10-27 |
The extended-attribute functions in rustix::fs (getxattr, lgetxattr, fgetxattr, listxattr, llistxattr and flistxattr) write into a Buffer and then mark as many bytes initialized as the system call reported. When the buffer has zero length, the operating system treats the call as a size query: it writes nothing and returns the size of the attribute value or of the name list. rustix still marked that many bytes as initialized.
Passing a Vec whose length equals its capacity through spare_capacity gives such a zero-length buffer, and rustix then set the vector's length past its capacity over memory that was never written. This is undefined behavior reachable from safe code. With an empty &mut [MaybeUninit<u8>] the call panics instead.
From 1.1.6 these functions return an empty result for a zero-length buffer, and new getxattr_query, lgetxattr_query, fgetxattr_query, listxattr_query, llistxattr_query and flistxattr_query functions return the size. The 0.38 series did not have the Buffer API and is not affected.
See advisory page for additional details.
- 主要语言
- Rust
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stackabletech/stackable-odbc-sqlite 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 50/100
查看 stackabletech/stackable-odbc-sqlite 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
storytold/photocraft#14822 ·
维护者通常 1 天内回复
-
bug css
难度 2/5 1-3 小时 新手友好度 66/100
dginev/latexml-oxide#853 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 2 天内回复
-
[Bug] export_build_environment admits its output directory only after the export ran in the build computer可能已有人在做 @viniciusdsandrade 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复