CVE
CVE-2022-49505
CNA 原文 · 原文(英文)
In the Linux kernel, the following vulnerability has been resolved: NFC: NULL out the dev->rfkill to prevent UAF Commit 3e3b5dfcd16a ("NFC: reorder the logic in nfc_{un,}register_device") assumes the device_is_registered() in function nfc_dev_up() will help to check when the rfkill is unregistered. However, this check only take effect when device_del(&dev->dev) is done in nfc_unregister_device(). Hence, the rfkill object is still possible be dereferenced. The crash trace in latest kernel (5.18-rc2): [ 68.760105] ================================================================== [ 68.760330] BUG: KASAN: use-after-free in __lock_acquire+0x3ec1/0x6750 [ 68.760756] Read of size 8 at addr ffff888009c93018 by task fuzz/313 [ 68.760756] [ 68.760756] CPU: 0 PID: 313 Comm: fuzz Not tainted 5.18.0-rc2 #4 [ 68.760756] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 68.760756] Call Trace: [ 68.760756] <TASK> [ 68.760756] dump_stack_lvl+0x57/0x7d [ 68.760756] print_report.cold+0x5e/0x5db [ 68.760756] ? __lock_acquire+0x3ec1/0x6750 [ 68.760756] kasan_report+0xbe/0x1c0 [ 68.760756] ? __lock_acquire+0x3ec1/0x6750 [ 68.760756] __lock_acquire+0x3ec1/0x6750 [ 68.760756] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 68.760756] ? register_lock_class+0x18d0/0x18d0 [ 68.760756] lock_acquire+0x1ac/0x4f0 [ 68.760756] ? rfkill_blocked+0xe/0x60 [ 68.760756] ? lockdep_hardirqs_on_prepare+0x410/0x410 [ 68.760756] ? mutex_lock_io_nested+0x12c0/0x12c0 [ 68.760756] ? nla_get_range_signed+0x540/0x540 [ 68.760756] ? _raw_spin_lock_irqsave+0x4e/0x50 [ 68.760756] _raw_spin_lock_irqsave+0x39/0x50 [ 68.760756] ? rfkill_blocked+0xe/0x60 [ 68.760756] rfkill_blocked+0xe/0x60 [ 68.760756] nfc_dev_up+0x84/0x260 [ 68.760756] nfc_genl_dev_up+0x90/0xe0 [ 68.760756] genl_family_rcv_msg_doit+0x1f4/0x2f0 [ 68.760756] ?…
受影响版本
- ≥ 5.18, < 5.18.3修复版本 5.18.3
- ≥ 5.16, < 5.17.14修复版本 5.17.14
- ≥ 5.15.5, < 5.15.46修复版本 5.15.46
- ≥ 5.10.82, < 5.10.121修复版本 5.10.121
- ≥ 5.4.162, < 5.4.198修复版本 5.4.198
- ≥ 4.19.218, < 4.19.247修复版本 4.19.247
- ≥ 4.14.256, < 4.14.283修复版本 4.14.283
- ≥ 4.9.291, < 4.9.318修复版本 4.9.318
- ≥ 4.4.293, < 4.5修复版本 4.5
发行版软件包(Debian、Ubuntu、Red Hat 等)会回移补丁而不改上游版本号,请同时查看所用发行版的安全公告。
公告与补丁
- git.kernel.org/stable/c/1632be63862f183cd5cf1cc094e698e6ec005dfd · Patch
- git.kernel.org/stable/c/1b0e81416a24d6e9b8c2341e22e8bf48f8b8bfc9 · Patch
- git.kernel.org/stable/c/2a1b5110c95e4d49c8c3906270dfcde680a5a7be · Patch
- git.kernel.org/stable/c/4a68938f43b7c2663e4c90bb9bbe29ac8b9a42a0 · Patch
- git.kernel.org/stable/c/4f5d71930f41be78557f9714393179025baacd65 · Patch
- git.kernel.org/stable/c/6abfaca8711803d0d7cc8c0fac1070a88509d463 · Patch
- git.kernel.org/stable/c/a8e03bcad52dc9afabf650fdbad84f739cec9efa · Patch
- git.kernel.org/stable/c/f81270125b50532624400063281e6611ecd61ddf · Patch
- git.kernel.org/stable/c/fbf9c4c714d3cdeb98b6a18e4d057f931cad1d81 · Patch
数据来源:NVD(公有领域)、CISA KEV(CC0)、FIRST EPSS、OSV.dev / GitHub Advisory Database(CC-BY 4.0) · 本库只列受影响版本与修复版本,不托管、不链接任何利用代码。