Skip to content
Heist/ feed
Back to feed
UnratedFix available

rbd: fix null-ptr-deref when device_add_disk() fails

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: rbd: fix null-ptr-deref when device_add_disk() fails do_rbd_add() publishes the device with device_add() before calling device_add_disk(). If device_add_disk() fails after device_add() succeeds, the error path calls rbd_free_disk() directly and then later falls through to rbd_dev_device_release(), which calls rbd_free_disk() again. This double teardown can leave blk-mq cleanup operating on invalid state and trigger a null-ptr-deref in __blk_mq_free_map_and_rqs(), reached from blk_mq_free_tag_set(). Fix this by following the normal remove ordering: call device_del() before rbd_dev_device_release() when device_add_disk() fails after device_add(). That keeps the teardown sequence consistent and avoids re-entering disk cleanup through the wrong path. The bug was first flagged by an experimental analysis tool we are developing for kernel memory-management bugs while analyzing v6.13-rc1. The tool is still under development and is not yet publicly available. We reproduced the bug on v7.0 with a real Ceph backend and a QEMU x86_64 guest booted with KASAN and CONFIG_FAILSLAB enabled. The reproducer confines failslab injections to the __add_disk() range and injects fail-nth while mapping an RBD image through /sys/bus/rbd/add_single_major. On the unpatched kernel, fail-nth=4 reliably triggered the fault: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASA

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.175, 6.12.86, 6.18.27, 6.6.140, 7.0.4
CVEs
CVE-2026-46079
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 20:33 UTC · Revision 1

Source evidence

rbd: fix null-ptr-deref when device_add_disk() fails

core-osv · Original source

Published 27 May 2026, 12:58 UTC

In the Linux kernel, the following vulnerability has been resolved: rbd: fix null-ptr-deref when device_add_disk() fails do_rbd_add() publishes the device with device_add() before calling device_add_disk(). If device_add_disk() fails after device_add() succeeds, the error path calls rbd_free_disk() directly and then later falls through to rbd_dev_device_release(), which calls rbd_free_disk() again. This double teardown can leave blk-mq cleanup operating on invalid state and trigger a null-ptr-deref in __blk_mq_free_map_and_rqs(), reached from blk_mq_free_tag_set(). Fix this by following the normal remove ordering: call device_del() before rbd_dev_device_release() when device_add_disk() fails after device_add(). That keeps the teardown sequence consistent and avoids re-entering disk cleanup through the wrong path. The bug was first flagged by an experimental analysis tool we are developing for kernel memory-management bugs while analyzing v6.13-rc1. The tool is still under development and is not yet publicly available. We reproduced the bug on v7.0 with a real Ceph backend and a QEMU x86_64 guest booted with KASAN and CONFIG_FAILSLAB enabled. The reproducer confines failslab injections to the __add_disk() range and injects fail-nth while mapping an RBD image through /sys/bus/rbd/add_single_major. On the unpatched kernel, fail-nth=4 reliably triggered the fault: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASA

osv:CVE-2026-46079

Kernel

Fixed versions: 6.1.175, 6.6.140, 6.12.86, 6.18.27, 7.0.4

Complete source record
{
  "id": "68dd43fb50794ab7fcf1eab520ba667acfcc083ea9f38e223cdccb1fb425d416",
  "url": "https://osv.dev/vulnerability/CVE-2026-46079",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "rbd: fix null-ptr-deref when device_add_disk() fails",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: rbd: fix null-ptr-deref when device_add_disk() fails do_rbd_add() publishes the device with device_add() before calling device_add_disk(). If device_add_disk() fails after device_add() succeeds, the error path calls rbd_free_disk() directly and then later falls through to rbd_dev_device_release(), which calls rbd_free_disk() again. This double teardown can leave blk-mq cleanup operating on invalid state and trigger a null-ptr-deref in __blk_mq_free_map_and_rqs(), reached from blk_mq_free_tag_set(). Fix this by following the normal remove ordering: call device_del() before rbd_dev_device_release() when device_add_disk() fails after device_add(). That keeps the teardown sequence consistent and avoids re-entering disk cleanup through the wrong path. The bug was first flagged by an experimental analysis tool we are developing for kernel memory-management bugs while analyzing v6.13-rc1. The tool is still under development and is not yet publicly available. We reproduced the bug on v7.0 with a real Ceph backend and a QEMU x86_64 guest booted with KASAN and CONFIG_FAILSLAB enabled. The reproducer confines failslab injections to the __add_disk() range and injects fail-nth while mapping an RBD image through /sys/bus/rbd/add_single_major. On the unpatched kernel, fail-nth=4 reliably triggered the fault: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASA",
    "evidence": "osv:CVE-2026-46079",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.175",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.140",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.86",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.27",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.0.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-46079",
      "aliases": [
        "CVE-2026-46079"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "27c97abc30e2b9ad2288977c0ecbef4d50553f57"
                },
                {
                  "fixed": "78bd0c143dea4b7a4c23c13356987ca0eafb442e"
                },
                {
                  "fixed": "2f4809a879f0750c7790bbeeae86c9505797a06f"
                },
                {
                  "fixed": "564cd8f4aeb9a938e470c5c91922fd02e4d41acc"
                },
                {
                  "fixed": "ad0126ffcba8777109852979eaaa6dca6703abdb"
                },
                {
                  "fixed": "059fb7656723c1b77c2fc0e64b7aa99d6bb65e8e"
                },
                {
                  "fixed": "d1fef92e414433ca7b89abf85cb0df42b8d475eb"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46079.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.175"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.140"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.86"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.27"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.0.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-46079.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:23.759593121Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/059fb7656723c1b77c2fc0e64b7aa99d6bb65e8e",
        "https://git.kernel.org/stable/c/2f4809a879f0750c7790bbeeae86c9505797a06f",
        "https://git.kernel.org/stable/c/564cd8f4aeb9a938e470c5c91922fd02e4d41acc",
        "https://git.kernel.org/stable/c/78bd0c143dea4b7a4c23c13356987ca0eafb442e",
        "https://git.kernel.org/stable/c/ad0126ffcba8777109852979eaaa6dca6703abdb",
        "https://git.kernel.org/stable/c/d1fef92e414433ca7b89abf85cb0df42b8d475eb",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/46xxx/CVE-2026-46079.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-46079",
        "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/2026/46xxx/CVE-2026-46079.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-46079",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 489879,
  "published_at": "2026-05-27T12:58:13.903+00:00"
}