Skip to content
Heist/ feed
Back to feed
UnratedFix available

btrfs: fix match incorrectly in dev_args_match_device

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.79, 6.0.9
CVEs
CVE-2022-49849
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 02:11 UTC · Revision 1

Source evidence

btrfs: fix match incorrectly in dev_args_match_device

core-osv · Original source

Published 1 May 2025, 14:10 UTC

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.

osv:CVE-2022-49849

Kernel

Fixed versions: 5.15.79, 6.0.9

Complete source record
{
  "id": "39f5cb1952ecdc1aeacd20723b5ffb7169e53d2e83b4d81193893640a1e98311",
  "url": "https://osv.dev/vulnerability/CVE-2022-49849",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "btrfs: fix match incorrectly in dev_args_match_device",
    "summary": "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.",
    "evidence": "osv:CVE-2022-49849",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.79",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.0.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-49849",
      "aliases": [
        "CVE-2022-49849"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5578b681fbf2b22d61189a2539efd3009518b328"
                },
                {
                  "fixed": "c9fe4719c662e0af17eea723cf345e37719fd3c9"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "562d7b1512f7369a19bca2883e2e8672d78f0481"
                },
                {
                  "fixed": "bc6c127c377010f136360552ebf91c2723081c1b"
                },
                {
                  "fixed": "0fca385d6ebc3cabb20f67bcf8a71f1448bdc001"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.15.54"
                },
                {
                  "fixed": "5.15.79"
                }
              ]
            }
          ],
          "versions": [
            "v5.15.78",
            "v5.15.77",
            "v5.15.76",
            "v5.15.75",
            "v5.15.74",
            "v5.15.73",
            "v5.15.72",
            "v5.15.71",
            "v5.15.70",
            "v5.15.69",
            "v5.15.68",
            "v5.15.67",
            "v5.15.66",
            "v5.15.65",
            "v5.15.64",
            "v5.15.63",
            "v5.15.62",
            "v5.15.61",
            "v5.15.60",
            "v5.15.59",
            "v5.15.58",
            "v5.15.57",
            "v5.15.56",
            "v5.15.55",
            "v5.15.54"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49849.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.15.79"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.0.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49849.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.318928147Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/0fca385d6ebc3cabb20f67bcf8a71f1448bdc001",
        "https://git.kernel.org/stable/c/bc6c127c377010f136360552ebf91c2723081c1b",
        "https://git.kernel.org/stable/c/c9fe4719c662e0af17eea723cf345e37719fd3c9",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49849.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-49849",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49849.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-49849",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 517263,
  "published_at": "2025-05-01T14:10:04.48+00:00"
}