CVE
CVE-2026-46299
CNA 原文 · 原文(英文)
In the Linux kernel, the following vulnerability has been resolved: hfsplus: fix held lock freed on hfsplus_fill_super() hfsplus_fill_super() calls hfs_find_init() to initialize a search structure, which acquires tree->tree_lock. If the subsequent call to hfsplus_cat_build_key() fails, the function jumps to the out_put_root error label without releasing the lock. The later cleanup path then frees the tree data structure with the lock still held, triggering a held lock freed warning. Fix this by adding the missing hfs_find_exit(&fd) call before jumping to the out_put_root error label. This ensures that tree->tree_lock is properly released on the error path. The bug was originally detected on v6.13-rc1 using an experimental static analysis tool we are developing, and we have verified that the issue persists in the latest mainline kernel. The tool is specifically designed to detect memory management issues. It is currently under active development and not yet publicly available. We confirmed the bug by runtime testing under QEMU with x86_64 defconfig, lockdep enabled, and CONFIG_HFSPLUS_FS=y. To trigger the error path, we used GDB to dynamically shrink the max_unistr_len parameter to 1 before hfsplus_asc2uni() is called. This forces hfsplus_asc2uni() to naturally return -ENAMETOOLONG, which propagates to hfsplus_cat_build_key() and exercises the faulty error path. The following warning was observed during mount: ========================= WARNING: held lock freed! 7.0.0-rc3-00016-gb4f0dd314b39 #4 Not tainted ------------------------- mount/174 is freeing memory ffff888103f92000-ffff888103f92fff, with a lock still held there! ffff888103f920b0 (&tree->tree_lock){+.+.}-{4:4}, at: hfsplus_find_init+0x154/0x1e0 2 locks held by mount/174: #0: ffff888103f960e0 (&type->s_umount_key#42/1){+.+.}-{4:4}, at: alloc_super.constprop.0+0x167/0xa40 #1: ffff888103f920b0 (&tree->tree_lock){+.+.}-{4:4}, at: hfsplus_find_init+0x154/0x1e0 stack backtrace: CPU: 2 UID: 0…
受影响版本
- ≥ 6.19, < 7.0.7修复版本 7.0.7
- ≥ 6.13, < 6.18.30修复版本 6.18.30
- ≥ 6.7, < 6.12.88修复版本 6.12.88
- ≥ 6.2, < 6.6.140修复版本 6.6.140
- ≥ 5.16, < 6.1.176修复版本 6.1.176
- ≥ 5.11, < 5.15.210修复版本 5.15.210
- ≥ 3.19, < 5.10.259修复版本 5.10.259
发行版软件包(Debian、Ubuntu、Red Hat 等)会回移补丁而不改上游版本号,请同时查看所用发行版的安全公告。
公告与补丁
- git.kernel.org/stable/c/041acda6d9f96006703466449c10c9a69590c8b9 · Patch
- git.kernel.org/stable/c/3ca80e3012c8be85b4f8d0d20eac8d3b17ff257e · Patch
- git.kernel.org/stable/c/6499c9c8ec437a369e7e221dad91f6122b50759d · Patch
- git.kernel.org/stable/c/90c500e4fd83fa33c09bc7ee23b6d9cc487ac733 · Patch
- git.kernel.org/stable/c/bfbcce6a7b0552a390620d9b2c4d2bcb1825cbdc · Patch
- git.kernel.org/stable/c/c554ddc87af4d4e4be42f8aed1baec9e1c7588e0 · Patch
- git.kernel.org/stable/c/d309d3308de658d87c42d97e044c89a226327526 · Patch
- git.kernel.org/stable/c/e890656accee4c26d932ea388eb8936a6e22184d · Patch
数据来源:NVD(公有领域)、CISA KEV(CC0)、FIRST EPSS、OSV.dev / GitHub Advisory Database(CC-BY 4.0) · 本库只列受影响版本与修复版本,不托管、不链接任何利用代码。