一、 漏洞 CVE-2022-49849 基础信息
漏洞信息
                                        # btrfs:修正在dev_args_match_device中的匹配错误

## 漏洞概述
在Linux内核中,btrfs文件系统存在一个漏洞,即`dev_args_match_device`函数中的匹配检查逻辑有误,可能导致错误地匹配设备。

## 影响版本
未明确指定版本,但漏洞由补丁 `562d7b1512f7` 引入。该补丁后版本可能存在该问题。

## 漏洞细节
- **错误触发**: 通过 `ioctl` 设置 `devid` 为 `(u64)-1` 时,会导致 `devid` 匹配被跳过,进而错误地匹配设备。
- **错误检测**: syzkaller 检测到如下断言失败:
  ```
  assertion failed: (args->devid != (u64)-1) || args->missing, in fs/btrfs/volumes.c:6921
  ```
- **修复策略**: 应该通过检查 `args->missing` 的值来区分两种匹配场景,而不是检查 `args->devid` 和 `args->uuid` 是否为默认值。

## 影响
此漏洞可能导致设备的不正确匹配,进而可能引发一系列的文件系统错误或安全问题。
                                        
提示
尽管我们采用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。
神龙会尽力确保数据准确,但也请结合实际情况进行甄别与判断。
神龙祝您一切顺利!
漏洞标题
btrfs: fix match incorrectly in dev_args_match_device
来源:美国国家漏洞数据库 NVD
漏洞描述信息
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix match incorrectly in dev_args_match_device syzkaller found a failed assertion: assertion failed: (args->devid != (u64)-1) || args->missing, in fs/btrfs/volumes.c:6921 This can be triggered when we set devid to (u64)-1 by ioctl. In this case, the match of devid will be skipped and the match of device may succeed incorrectly. Patch 562d7b1512f7 introduced this function which is used to match device. This function contains two matching scenarios, we can distinguish them by checking the value of args->missing rather than check whether args->devid and args->uuid is default value.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
N/A
来源:美国国家漏洞数据库 NVD
漏洞标题
Linux kernel 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于btrfs驱动中dev_args_match_device函数对devid匹配不当,可能导致断言失败。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2022-49849 的公开POC
# POC 描述 源链接 神龙链接
三、漏洞 CVE-2022-49849 的情报信息