CVE-2021-46981 (GCVE-0-2021-46981)

Vulnerability from cvelistv5 – Published: 2024-02-28 08:13 – Updated: 2026-05-23 15:18
VLAI
Title
nbd: Fix NULL pointer in flush_workqueue
Summary
In the Linux kernel, the following vulnerability has been resolved: nbd: Fix NULL pointer in flush_workqueue Open /dev/nbdX first, the config_refs will be 1 and the pointers in nbd_device are still null. Disconnect /dev/nbdX, then reference a null recv_workq. The protection by config_refs in nbd_genl_disconnect is useless. [ 656.366194] BUG: kernel NULL pointer dereference, address: 0000000000000020 [ 656.368943] #PF: supervisor write access in kernel mode [ 656.369844] #PF: error_code(0x0002) - not-present page [ 656.370717] PGD 10cc87067 P4D 10cc87067 PUD 1074b4067 PMD 0 [ 656.371693] Oops: 0002 [#1] SMP [ 656.372242] CPU: 5 PID: 7977 Comm: nbd-client Not tainted 5.11.0-rc5-00040-g76c057c84d28 #1 [ 656.373661] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 [ 656.375904] RIP: 0010:mutex_lock+0x29/0x60 [ 656.376627] Code: 00 0f 1f 44 00 00 55 48 89 fd 48 83 05 6f d7 fe 08 01 e8 7a c3 ff ff 48 83 05 6a d7 fe 08 01 31 c0 65 48 8b 14 25 00 6d 01 00 <f0> 48 0f b1 55 d [ 656.378934] RSP: 0018:ffffc900005eb9b0 EFLAGS: 00010246 [ 656.379350] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 656.379915] RDX: ffff888104cf2600 RSI: ffffffffaae8f452 RDI: 0000000000000020 [ 656.380473] RBP: 0000000000000020 R08: 0000000000000000 R09: ffff88813bd6b318 [ 656.381039] R10: 00000000000000c7 R11: fefefefefefefeff R12: ffff888102710b40 [ 656.381599] R13: ffffc900005eb9e0 R14: ffffffffb2930680 R15: ffff88810770ef00 [ 656.382166] FS: 00007fdf117ebb40(0000) GS:ffff88813bd40000(0000) knlGS:0000000000000000 [ 656.382806] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 656.383261] CR2: 0000000000000020 CR3: 0000000100c84000 CR4: 00000000000006e0 [ 656.383819] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 656.384370] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 656.384927] Call Trace: [ 656.385111] flush_workqueue+0x92/0x6c0 [ 656.385395] nbd_disconnect_and_put+0x81/0xd0 [ 656.385716] nbd_genl_disconnect+0x125/0x2a0 [ 656.386034] genl_family_rcv_msg_doit.isra.0+0x102/0x1b0 [ 656.386422] genl_rcv_msg+0xfc/0x2b0 [ 656.386685] ? nbd_ioctl+0x490/0x490 [ 656.386954] ? genl_family_rcv_msg_doit.isra.0+0x1b0/0x1b0 [ 656.387354] netlink_rcv_skb+0x62/0x180 [ 656.387638] genl_rcv+0x34/0x60 [ 656.387874] netlink_unicast+0x26d/0x590 [ 656.388162] netlink_sendmsg+0x398/0x6c0 [ 656.388451] ? netlink_rcv_skb+0x180/0x180 [ 656.388750] ____sys_sendmsg+0x1da/0x320 [ 656.389038] ? ____sys_recvmsg+0x130/0x220 [ 656.389334] ___sys_sendmsg+0x8e/0xf0 [ 656.389605] ? ___sys_recvmsg+0xa2/0xf0 [ 656.389889] ? handle_mm_fault+0x1671/0x21d0 [ 656.390201] __sys_sendmsg+0x6d/0xe0 [ 656.390464] __x64_sys_sendmsg+0x23/0x30 [ 656.390751] do_syscall_64+0x45/0x70 [ 656.391017] entry_SYSCALL_64_after_hwframe+0x44/0xa9 To fix it, just add if (nbd->recv_workq) to nbd_disconnect_and_put().
Severity
No CVSS data available.
SSVC
Exploitation: none Automatable: no Technical Impact: partial
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2024-02-28 19:55 UTC
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: e9e006f5fcf2bab59149cb38a48a4817c1b538b4 , < 1c4962df938891af9ab4775f5224ef8601764107 (git)
Affected: e9e006f5fcf2bab59149cb38a48a4817c1b538b4 , < cde4b55cfb24522dcbba80bbdb0c082303e76c43 (git)
Affected: e9e006f5fcf2bab59149cb38a48a4817c1b538b4 , < b31d237796fd618379ec8e0f4de3370b5e4aeee7 (git)
Affected: e9e006f5fcf2bab59149cb38a48a4817c1b538b4 , < 54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc (git)
Affected: e9e006f5fcf2bab59149cb38a48a4817c1b538b4 , < 79ebe9110fa458d58f1fceb078e2068d7ad37390 (git)
Affected: 0b584bf573ae59021069c056c22d65d5721910cb (git)
Affected: 9f0f39c92e4f50189155dfb13bb5524372e40eba (git)
Affected: 92ec11cccb7fc14331e000ab2337f60aa433433e (git)
Affected: 4.14.149 , < 4.15 (semver)
Affected: 4.19.79 , < 4.20 (semver)
Affected: 5.3.6 , < 5.4 (semver)
guessed Create a notification for this product.
Linux Linux Affected: 5.4
Unaffected: 0 , < 5.4 (semver)
Unaffected: 5.4.120 , ≤ 5.4.* (semver)
Unaffected: 5.10.38 , ≤ 5.10.* (semver)
Unaffected: 5.11.22 , ≤ 5.11.* (semver)
Unaffected: 5.12.5 , ≤ 5.12.* (semver)
Unaffected: 5.13 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-46981",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-02-28T19:55:25.767523Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:13:11.297Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T05:24:38.514Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/1c4962df938891af9ab4775f5224ef8601764107"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/cde4b55cfb24522dcbba80bbdb0c082303e76c43"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/b31d237796fd618379ec8e0f4de3370b5e4aeee7"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/79ebe9110fa458d58f1fceb078e2068d7ad37390"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/block/nbd.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "1c4962df938891af9ab4775f5224ef8601764107",
              "status": "affected",
              "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
              "versionType": "git"
            },
            {
              "lessThan": "cde4b55cfb24522dcbba80bbdb0c082303e76c43",
              "status": "affected",
              "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
              "versionType": "git"
            },
            {
              "lessThan": "b31d237796fd618379ec8e0f4de3370b5e4aeee7",
              "status": "affected",
              "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
              "versionType": "git"
            },
            {
              "lessThan": "54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc",
              "status": "affected",
              "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
              "versionType": "git"
            },
            {
              "lessThan": "79ebe9110fa458d58f1fceb078e2068d7ad37390",
              "status": "affected",
              "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "0b584bf573ae59021069c056c22d65d5721910cb",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "9f0f39c92e4f50189155dfb13bb5524372e40eba",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "92ec11cccb7fc14331e000ab2337f60aa433433e",
              "versionType": "git"
            },
            {
              "lessThan": "4.15",
              "status": "affected",
              "version": "4.14.149",
              "versionType": "semver"
            },
            {
              "lessThan": "4.20",
              "status": "affected",
              "version": "4.19.79",
              "versionType": "semver"
            },
            {
              "lessThan": "5.4",
              "status": "affected",
              "version": "5.3.6",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/block/nbd.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.4"
            },
            {
              "lessThan": "5.4",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.120",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.38",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.11.*",
              "status": "unaffected",
              "version": "5.11.22",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.12.*",
              "status": "unaffected",
              "version": "5.12.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.120",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.38",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.11.22",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.12.5",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.13",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "4.14.149",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "4.19.79",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "5.3.6",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnbd: Fix NULL pointer in flush_workqueue\n\nOpen /dev/nbdX first, the config_refs will be 1 and\nthe pointers in nbd_device are still null. Disconnect\n/dev/nbdX, then reference a null recv_workq. The\nprotection by config_refs in nbd_genl_disconnect is useless.\n\n[  656.366194] BUG: kernel NULL pointer dereference, address: 0000000000000020\n[  656.368943] #PF: supervisor write access in kernel mode\n[  656.369844] #PF: error_code(0x0002) - not-present page\n[  656.370717] PGD 10cc87067 P4D 10cc87067 PUD 1074b4067 PMD 0\n[  656.371693] Oops: 0002 [#1] SMP\n[  656.372242] CPU: 5 PID: 7977 Comm: nbd-client Not tainted 5.11.0-rc5-00040-g76c057c84d28 #1\n[  656.373661] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014\n[  656.375904] RIP: 0010:mutex_lock+0x29/0x60\n[  656.376627] Code: 00 0f 1f 44 00 00 55 48 89 fd 48 83 05 6f d7 fe 08 01 e8 7a c3 ff ff 48 83 05 6a d7 fe 08 01 31 c0 65 48 8b 14 25 00 6d 01 00 \u003cf0\u003e 48 0f b1 55 d\n[  656.378934] RSP: 0018:ffffc900005eb9b0 EFLAGS: 00010246\n[  656.379350] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000\n[  656.379915] RDX: ffff888104cf2600 RSI: ffffffffaae8f452 RDI: 0000000000000020\n[  656.380473] RBP: 0000000000000020 R08: 0000000000000000 R09: ffff88813bd6b318\n[  656.381039] R10: 00000000000000c7 R11: fefefefefefefeff R12: ffff888102710b40\n[  656.381599] R13: ffffc900005eb9e0 R14: ffffffffb2930680 R15: ffff88810770ef00\n[  656.382166] FS:  00007fdf117ebb40(0000) GS:ffff88813bd40000(0000) knlGS:0000000000000000\n[  656.382806] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n[  656.383261] CR2: 0000000000000020 CR3: 0000000100c84000 CR4: 00000000000006e0\n[  656.383819] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n[  656.384370] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n[  656.384927] Call Trace:\n[  656.385111]  flush_workqueue+0x92/0x6c0\n[  656.385395]  nbd_disconnect_and_put+0x81/0xd0\n[  656.385716]  nbd_genl_disconnect+0x125/0x2a0\n[  656.386034]  genl_family_rcv_msg_doit.isra.0+0x102/0x1b0\n[  656.386422]  genl_rcv_msg+0xfc/0x2b0\n[  656.386685]  ? nbd_ioctl+0x490/0x490\n[  656.386954]  ? genl_family_rcv_msg_doit.isra.0+0x1b0/0x1b0\n[  656.387354]  netlink_rcv_skb+0x62/0x180\n[  656.387638]  genl_rcv+0x34/0x60\n[  656.387874]  netlink_unicast+0x26d/0x590\n[  656.388162]  netlink_sendmsg+0x398/0x6c0\n[  656.388451]  ? netlink_rcv_skb+0x180/0x180\n[  656.388750]  ____sys_sendmsg+0x1da/0x320\n[  656.389038]  ? ____sys_recvmsg+0x130/0x220\n[  656.389334]  ___sys_sendmsg+0x8e/0xf0\n[  656.389605]  ? ___sys_recvmsg+0xa2/0xf0\n[  656.389889]  ? handle_mm_fault+0x1671/0x21d0\n[  656.390201]  __sys_sendmsg+0x6d/0xe0\n[  656.390464]  __x64_sys_sendmsg+0x23/0x30\n[  656.390751]  do_syscall_64+0x45/0x70\n[  656.391017]  entry_SYSCALL_64_after_hwframe+0x44/0xa9\n\nTo fix it, just add if (nbd-\u003erecv_workq) to nbd_disconnect_and_put()."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-23T15:18:51.744Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/1c4962df938891af9ab4775f5224ef8601764107"
        },
        {
          "url": "https://git.kernel.org/stable/c/cde4b55cfb24522dcbba80bbdb0c082303e76c43"
        },
        {
          "url": "https://git.kernel.org/stable/c/b31d237796fd618379ec8e0f4de3370b5e4aeee7"
        },
        {
          "url": "https://git.kernel.org/stable/c/54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc"
        },
        {
          "url": "https://git.kernel.org/stable/c/79ebe9110fa458d58f1fceb078e2068d7ad37390"
        }
      ],
      "title": "nbd: Fix NULL pointer in flush_workqueue",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2021-46981",
    "datePublished": "2024-02-28T08:13:10.972Z",
    "dateReserved": "2024-02-27T18:42:55.945Z",
    "dateUpdated": "2026-05-23T15:18:51.744Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2021-46981",
      "date": "2026-09-28",
      "epss": "0.0025",
      "percentile": "0.14606"
    },
    "fkie_nvd": {
      "configurations": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "74E02350-43FB-4F4F-B822-E9CA42371263",
                  "versionEndExcluding": "5.4.120",
                  "versionStartIncluding": "5.4",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "2BB4E5E8-4AAD-475A-A1B9-F287254C7D72",
                  "versionEndExcluding": "5.10.38",
                  "versionStartIncluding": "5.5",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "83B53E9A-F426-4C03-9A5F-A931FF79827E",
                  "versionEndExcluding": "5.11.22",
                  "versionStartIncluding": "5.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "matchCriteriaId": "0274929A-B36C-4F4C-AB22-30A0DD6B995B",
                  "versionEndExcluding": "5.12.5",
                  "versionStartIncluding": "5.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:5.13:rc1:*:*:*:*:*:*",
                  "matchCriteriaId": "0CBAD0FC-C281-4666-AB2F-F8E6E1165DF7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnbd: Fix NULL pointer in flush_workqueue\n\nOpen /dev/nbdX first, the config_refs will be 1 and\nthe pointers in nbd_device are still null. Disconnect\n/dev/nbdX, then reference a null recv_workq. The\nprotection by config_refs in nbd_genl_disconnect is useless.\n\n[  656.366194] BUG: kernel NULL pointer dereference, address: 0000000000000020\n[  656.368943] #PF: supervisor write access in kernel mode\n[  656.369844] #PF: error_code(0x0002) - not-present page\n[  656.370717] PGD 10cc87067 P4D 10cc87067 PUD 1074b4067 PMD 0\n[  656.371693] Oops: 0002 [#1] SMP\n[  656.372242] CPU: 5 PID: 7977 Comm: nbd-client Not tainted 5.11.0-rc5-00040-g76c057c84d28 #1\n[  656.373661] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014\n[  656.375904] RIP: 0010:mutex_lock+0x29/0x60\n[  656.376627] Code: 00 0f 1f 44 00 00 55 48 89 fd 48 83 05 6f d7 fe 08 01 e8 7a c3 ff ff 48 83 05 6a d7 fe 08 01 31 c0 65 48 8b 14 25 00 6d 01 00 \u003cf0\u003e 48 0f b1 55 d\n[  656.378934] RSP: 0018:ffffc900005eb9b0 EFLAGS: 00010246\n[  656.379350] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000\n[  656.379915] RDX: ffff888104cf2600 RSI: ffffffffaae8f452 RDI: 0000000000000020\n[  656.380473] RBP: 0000000000000020 R08: 0000000000000000 R09: ffff88813bd6b318\n[  656.381039] R10: 00000000000000c7 R11: fefefefefefefeff R12: ffff888102710b40\n[  656.381599] R13: ffffc900005eb9e0 R14: ffffffffb2930680 R15: ffff88810770ef00\n[  656.382166] FS:  00007fdf117ebb40(0000) GS:ffff88813bd40000(0000) knlGS:0000000000000000\n[  656.382806] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n[  656.383261] CR2: 0000000000000020 CR3: 0000000100c84000 CR4: 00000000000006e0\n[  656.383819] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n[  656.384370] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n[  656.384927] Call Trace:\n[  656.385111]  flush_workqueue+0x92/0x6c0\n[  656.385395]  nbd_disconnect_and_put+0x81/0xd0\n[  656.385716]  nbd_genl_disconnect+0x125/0x2a0\n[  656.386034]  genl_family_rcv_msg_doit.isra.0+0x102/0x1b0\n[  656.386422]  genl_rcv_msg+0xfc/0x2b0\n[  656.386685]  ? nbd_ioctl+0x490/0x490\n[  656.386954]  ? genl_family_rcv_msg_doit.isra.0+0x1b0/0x1b0\n[  656.387354]  netlink_rcv_skb+0x62/0x180\n[  656.387638]  genl_rcv+0x34/0x60\n[  656.387874]  netlink_unicast+0x26d/0x590\n[  656.388162]  netlink_sendmsg+0x398/0x6c0\n[  656.388451]  ? netlink_rcv_skb+0x180/0x180\n[  656.388750]  ____sys_sendmsg+0x1da/0x320\n[  656.389038]  ? ____sys_recvmsg+0x130/0x220\n[  656.389334]  ___sys_sendmsg+0x8e/0xf0\n[  656.389605]  ? ___sys_recvmsg+0xa2/0xf0\n[  656.389889]  ? handle_mm_fault+0x1671/0x21d0\n[  656.390201]  __sys_sendmsg+0x6d/0xe0\n[  656.390464]  __x64_sys_sendmsg+0x23/0x30\n[  656.390751]  do_syscall_64+0x45/0x70\n[  656.391017]  entry_SYSCALL_64_after_hwframe+0x44/0xa9\n\nTo fix it, just add if (nbd-\u003erecv_workq) to nbd_disconnect_and_put()."
        },
        {
          "lang": "es",
          "value": "En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: nbd: corrija el puntero NULL en flush_workqueue Abra /dev/nbdX primero, config_refs ser\u00e1 1 y los punteros en nbd_device seguir\u00e1n siendo nulos. Desconecte /dev/nbdX, luego haga referencia a un recv_workq nulo. La protecci\u00f3n de config_refs en nbd_genl_disconnect es in\u00fatil. [656.366194] ERROR: desreferencia del puntero NULL del kernel, direcci\u00f3n: 00000000000000020 [656.368943] #PF: acceso de escritura del supervisor en modo kernel [656.369844] #PF: c\u00f3digo_error(0x0002) - p\u00e1gina no presente [656.370717] PGD 10cc87067 P 4D 10cc87067 PUD 1074b4067 PMD 0 [656.371693] Ups: 0002 [#1] SMP [656.372242] CPU: 5 PID: 7977 Comm: nbd-client No contaminado 5.11.0-rc5-00040-g76c057c84d28 #1 [656.373661] Nombre de hardware: PC est\u00e1ndar QEMU (i 440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 01/04/2014 [ 656.375904] RIP: 0010:mutex_lock+0x29/0x60 [ 656.376627] C\u00f3digo: 00 0f 1f 44 00 00 55 48 89 fd 48 83 05 6f d7 fe 08 01 e8 7a c3 ff ff 48 83 05 6a d7 fe 08 01 31 c0 65 48 8b 14 25 00 6d 01 00  48 0f b1 55 d [ 656.378934 ] RSP: 0018:ffffc900005eb9b0 EFLAGS: 00010246 [ 656.379350] RAX: 0000000000000000 RBX: 00000000000000000 RCX: 0000000000000000 [ 656.379915 ] RDX: ffff888104cf2600 RSI: fffffffaae8f452 RDI: 0000000000000020 [ 656.380473] RBP: 00000000000000020 R08: 00000000000000000 R09: ffff88813bd6b31 8 [656.381039] R10: 00000000000000c7 R11: fefefefefefefeff R12: ffff888102710b40 [ 656.381599] R13: ffffc900005eb9e0 R14: ffffffffb2930680 R15: ffff88810770ef00 [ 656.3821 66] FS: 00007fdf117ebb40(0000) GS:ffff88813bd40000(0000) knlGS:0000000000000000 [ 656.382806] CS: 0010 DS: 0000 ES: 0000 CR0 : 0000000080050033 [ 656.383261] CR2: 0000000000000020 CR3: 0000000100c84000 CR4: 00000000000006e0 [ 656.383819] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 656.384370] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 656.384927] Seguimiento de llamadas : [656.385111] flux_workqueue+0x92 /0x6c0 [ 656.385395] nbd_disconnect_and_put+0x81/0xd0 [ 656.385716] nbd_genl_disconnect+0x125/0x2a0 [ 656.386034] genl_family_rcv_msg_doit.isra.0+0x102/0x1b0 [ 656 .386422] genl_rcv_msg+0xfc/0x2b0 [656.386685]? nbd_ioctl+0x490/0x490 [656.386954]? genl_family_rcv_msg_doit.isra.0+0x1b0/0x1b0 [ 656.387354] netlink_rcv_skb+0x62/0x180 [ 656.387638] genl_rcv+0x34/0x60 [ 656.387874] netlink_unicast+0x26d/0x590 [ 6 56.388162] netlink_sendmsg+0x398/0x6c0 [656.388451]? netlink_rcv_skb+0x180/0x180 [656.388750] ____sys_sendmsg+0x1da/0x320 [656.389038] ? ____sys_recvmsg+0x130/0x220 [ 656.389334] ___sys_sendmsg+0x8e/0xf0 [ 656.389605] ? ___sys_recvmsg+0xa2/0xf0 [656.389889] ? handle_mm_fault+0x1671/0x21d0 [ 656.390201] __sys_sendmsg+0x6d/0xe0 [ 656.390464] __x64_sys_sendmsg+0x23/0x30 [ 656.390751] do_syscall_64+0x45/0x70 [656.391017] Entry_SYSCALL_64_after_hwframe+0x44/0xa9 Para solucionarlo, simplemente agregue if (nbd-\u0026gt;recv_workq) a nbd_disconnect_and_put()."
        }
      ],
      "id": "CVE-2021-46981",
      "lastModified": "2024-12-06T15:59:55.120",
      "metrics": {
        "cvssMetricV31": [
          {
            "cvssData": {
              "attackComplexity": "LOW",
              "attackVector": "LOCAL",
              "availabilityImpact": "HIGH",
              "baseScore": 5.5,
              "baseSeverity": "MEDIUM",
              "confidentialityImpact": "NONE",
              "integrityImpact": "NONE",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
              "version": "3.1"
            },
            "exploitabilityScore": 1.8,
            "impactScore": 3.6,
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ]
      },
      "published": "2024-02-28T09:15:37.320",
      "references": [
        {
          "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/1c4962df938891af9ab4775f5224ef8601764107"
        },
        {
          "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc"
        },
        {
          "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/79ebe9110fa458d58f1fceb078e2068d7ad37390"
        },
        {
          "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/b31d237796fd618379ec8e0f4de3370b5e4aeee7"
        },
        {
          "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/cde4b55cfb24522dcbba80bbdb0c082303e76c43"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/1c4962df938891af9ab4775f5224ef8601764107"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/79ebe9110fa458d58f1fceb078e2068d7ad37390"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/b31d237796fd618379ec8e0f4de3370b5e4aeee7"
        },
        {
          "source": "af854a3a-2127-422b-91ae-364da2661108",
          "tags": [
            "Patch"
          ],
          "url": "https://git.kernel.org/stable/c/cde4b55cfb24522dcbba80bbdb0c082303e76c43"
        }
      ],
      "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "vulnStatus": "Analyzed",
      "weaknesses": [
        {
          "description": [
            {
              "lang": "en",
              "value": "CWE-476"
            }
          ],
          "source": "nvd@nist.gov",
          "type": "Primary"
        }
      ]
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "drivers/block/nbd.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "1c4962df938891af9ab4775f5224ef8601764107",
                    "status": "affected",
                    "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "cde4b55cfb24522dcbba80bbdb0c082303e76c43",
                    "status": "affected",
                    "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "b31d237796fd618379ec8e0f4de3370b5e4aeee7",
                    "status": "affected",
                    "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc",
                    "status": "affected",
                    "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "79ebe9110fa458d58f1fceb078e2068d7ad37390",
                    "status": "affected",
                    "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                    "versionType": "git"
                  },
                  {
                    "status": "affected",
                    "version": "0b584bf573ae59021069c056c22d65d5721910cb",
                    "versionType": "git"
                  },
                  {
                    "status": "affected",
                    "version": "9f0f39c92e4f50189155dfb13bb5524372e40eba",
                    "versionType": "git"
                  },
                  {
                    "status": "affected",
                    "version": "92ec11cccb7fc14331e000ab2337f60aa433433e",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "4.15",
                    "status": "affected",
                    "version": "4.14.149",
                    "versionType": "semver"
                  },
                  {
                    "lessThan": "4.20",
                    "status": "affected",
                    "version": "4.19.79",
                    "versionType": "semver"
                  },
                  {
                    "lessThan": "5.4",
                    "status": "affected",
                    "version": "5.3.6",
                    "versionType": "semver"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "drivers/block/nbd.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "5.4"
                  },
                  {
                    "lessThan": "5.4",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "5.4.*",
                    "status": "unaffected",
                    "version": "5.4.120",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "5.10.*",
                    "status": "unaffected",
                    "version": "5.10.38",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "5.11.*",
                    "status": "unaffected",
                    "version": "5.11.22",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "5.12.*",
                    "status": "unaffected",
                    "version": "5.12.5",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "5.13",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "configurations": [
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "74E02350-43FB-4F4F-B822-E9CA42371263",
                    "versionEndExcluding": "5.4.120",
                    "versionStartIncluding": "5.4",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "2BB4E5E8-4AAD-475A-A1B9-F287254C7D72",
                    "versionEndExcluding": "5.10.38",
                    "versionStartIncluding": "5.5",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "83B53E9A-F426-4C03-9A5F-A931FF79827E",
                    "versionEndExcluding": "5.11.22",
                    "versionStartIncluding": "5.11",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "0274929A-B36C-4F4C-AB22-30A0DD6B995B",
                    "versionEndExcluding": "5.12.5",
                    "versionStartIncluding": "5.12",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:5.13:rc1:*:*:*:*:*:*",
                    "matchCriteriaId": "0CBAD0FC-C281-4666-AB2F-F8E6E1165DF7",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnbd: Fix NULL pointer in flush_workqueue\n\nOpen /dev/nbdX first, the config_refs will be 1 and\nthe pointers in nbd_device are still null. Disconnect\n/dev/nbdX, then reference a null recv_workq. The\nprotection by config_refs in nbd_genl_disconnect is useless.\n\n[  656.366194] BUG: kernel NULL pointer dereference, address: 0000000000000020\n[  656.368943] #PF: supervisor write access in kernel mode\n[  656.369844] #PF: error_code(0x0002) - not-present page\n[  656.370717] PGD 10cc87067 P4D 10cc87067 PUD 1074b4067 PMD 0\n[  656.371693] Oops: 0002 [#1] SMP\n[  656.372242] CPU: 5 PID: 7977 Comm: nbd-client Not tainted 5.11.0-rc5-00040-g76c057c84d28 #1\n[  656.373661] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014\n[  656.375904] RIP: 0010:mutex_lock+0x29/0x60\n[  656.376627] Code: 00 0f 1f 44 00 00 55 48 89 fd 48 83 05 6f d7 fe 08 01 e8 7a c3 ff ff 48 83 05 6a d7 fe 08 01 31 c0 65 48 8b 14 25 00 6d 01 00 \u003cf0\u003e 48 0f b1 55 d\n[  656.378934] RSP: 0018:ffffc900005eb9b0 EFLAGS: 00010246\n[  656.379350] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000\n[  656.379915] RDX: ffff888104cf2600 RSI: ffffffffaae8f452 RDI: 0000000000000020\n[  656.380473] RBP: 0000000000000020 R08: 0000000000000000 R09: ffff88813bd6b318\n[  656.381039] R10: 00000000000000c7 R11: fefefefefefefeff R12: ffff888102710b40\n[  656.381599] R13: ffffc900005eb9e0 R14: ffffffffb2930680 R15: ffff88810770ef00\n[  656.382166] FS:  00007fdf117ebb40(0000) GS:ffff88813bd40000(0000) knlGS:0000000000000000\n[  656.382806] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n[  656.383261] CR2: 0000000000000020 CR3: 0000000100c84000 CR4: 00000000000006e0\n[  656.383819] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n[  656.384370] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n[  656.384927] Call Trace:\n[  656.385111]  flush_workqueue+0x92/0x6c0\n[  656.385395]  nbd_disconnect_and_put+0x81/0xd0\n[  656.385716]  nbd_genl_disconnect+0x125/0x2a0\n[  656.386034]  genl_family_rcv_msg_doit.isra.0+0x102/0x1b0\n[  656.386422]  genl_rcv_msg+0xfc/0x2b0\n[  656.386685]  ? nbd_ioctl+0x490/0x490\n[  656.386954]  ? genl_family_rcv_msg_doit.isra.0+0x1b0/0x1b0\n[  656.387354]  netlink_rcv_skb+0x62/0x180\n[  656.387638]  genl_rcv+0x34/0x60\n[  656.387874]  netlink_unicast+0x26d/0x590\n[  656.388162]  netlink_sendmsg+0x398/0x6c0\n[  656.388451]  ? netlink_rcv_skb+0x180/0x180\n[  656.388750]  ____sys_sendmsg+0x1da/0x320\n[  656.389038]  ? ____sys_recvmsg+0x130/0x220\n[  656.389334]  ___sys_sendmsg+0x8e/0xf0\n[  656.389605]  ? ___sys_recvmsg+0xa2/0xf0\n[  656.389889]  ? handle_mm_fault+0x1671/0x21d0\n[  656.390201]  __sys_sendmsg+0x6d/0xe0\n[  656.390464]  __x64_sys_sendmsg+0x23/0x30\n[  656.390751]  do_syscall_64+0x45/0x70\n[  656.391017]  entry_SYSCALL_64_after_hwframe+0x44/0xa9\n\nTo fix it, just add if (nbd-\u003erecv_workq) to nbd_disconnect_and_put()."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: nbd: corrija el puntero NULL en flush_workqueue Abra /dev/nbdX primero, config_refs ser\u00e1 1 y los punteros en nbd_device seguir\u00e1n siendo nulos. Desconecte /dev/nbdX, luego haga referencia a un recv_workq nulo. La protecci\u00f3n de config_refs en nbd_genl_disconnect es in\u00fatil. [656.366194] ERROR: desreferencia del puntero NULL del kernel, direcci\u00f3n: 00000000000000020 [656.368943] #PF: acceso de escritura del supervisor en modo kernel [656.369844] #PF: c\u00f3digo_error(0x0002) - p\u00e1gina no presente [656.370717] PGD 10cc87067 P 4D 10cc87067 PUD 1074b4067 PMD 0 [656.371693] Ups: 0002 [#1] SMP [656.372242] CPU: 5 PID: 7977 Comm: nbd-client No contaminado 5.11.0-rc5-00040-g76c057c84d28 #1 [656.373661] Nombre de hardware: PC est\u00e1ndar QEMU (i 440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 01/04/2014 [ 656.375904] RIP: 0010:mutex_lock+0x29/0x60 [ 656.376627] C\u00f3digo: 00 0f 1f 44 00 00 55 48 89 fd 48 83 05 6f d7 fe 08 01 e8 7a c3 ff ff 48 83 05 6a d7 fe 08 01 31 c0 65 48 8b 14 25 00 6d 01 00  48 0f b1 55 d [ 656.378934 ] RSP: 0018:ffffc900005eb9b0 EFLAGS: 00010246 [ 656.379350] RAX: 0000000000000000 RBX: 00000000000000000 RCX: 0000000000000000 [ 656.379915 ] RDX: ffff888104cf2600 RSI: fffffffaae8f452 RDI: 0000000000000020 [ 656.380473] RBP: 00000000000000020 R08: 00000000000000000 R09: ffff88813bd6b31 8 [656.381039] R10: 00000000000000c7 R11: fefefefefefefeff R12: ffff888102710b40 [ 656.381599] R13: ffffc900005eb9e0 R14: ffffffffb2930680 R15: ffff88810770ef00 [ 656.3821 66] FS: 00007fdf117ebb40(0000) GS:ffff88813bd40000(0000) knlGS:0000000000000000 [ 656.382806] CS: 0010 DS: 0000 ES: 0000 CR0 : 0000000080050033 [ 656.383261] CR2: 0000000000000020 CR3: 0000000100c84000 CR4: 00000000000006e0 [ 656.383819] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 656.384370] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 656.384927] Seguimiento de llamadas : [656.385111] flux_workqueue+0x92 /0x6c0 [ 656.385395] nbd_disconnect_and_put+0x81/0xd0 [ 656.385716] nbd_genl_disconnect+0x125/0x2a0 [ 656.386034] genl_family_rcv_msg_doit.isra.0+0x102/0x1b0 [ 656 .386422] genl_rcv_msg+0xfc/0x2b0 [656.386685]? nbd_ioctl+0x490/0x490 [656.386954]? genl_family_rcv_msg_doit.isra.0+0x1b0/0x1b0 [ 656.387354] netlink_rcv_skb+0x62/0x180 [ 656.387638] genl_rcv+0x34/0x60 [ 656.387874] netlink_unicast+0x26d/0x590 [ 6 56.388162] netlink_sendmsg+0x398/0x6c0 [656.388451]? netlink_rcv_skb+0x180/0x180 [656.388750] ____sys_sendmsg+0x1da/0x320 [656.389038] ? ____sys_recvmsg+0x130/0x220 [ 656.389334] ___sys_sendmsg+0x8e/0xf0 [ 656.389605] ? ___sys_recvmsg+0xa2/0xf0 [656.389889] ? handle_mm_fault+0x1671/0x21d0 [ 656.390201] __sys_sendmsg+0x6d/0xe0 [ 656.390464] __x64_sys_sendmsg+0x23/0x30 [ 656.390751] do_syscall_64+0x45/0x70 [656.391017] Entry_SYSCALL_64_after_hwframe+0x44/0xa9 Para solucionarlo, simplemente agregue if (nbd-\u0026gt;recv_workq) a nbd_disconnect_and_put()."
          }
        ],
        "id": "CVE-2021-46981",
        "lastModified": "2026-06-17T04:16:03.980",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 5.5,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "NONE",
                "integrityImpact": "NONE",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 3.6,
              "source": "nvd@nist.gov",
              "type": "Primary"
            }
          ],
          "ssvcV203": [
            {
              "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "ssvcData": {
                "id": "CVE-2021-46981",
                "options": [
                  {
                    "exploitation": "none"
                  },
                  {
                    "automatable": "no"
                  },
                  {
                    "technicalImpact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-02-28T19:55:25.767523Z",
                "version": "2.0.3"
              }
            }
          ]
        },
        "published": "2024-02-28T09:15:37.320",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/1c4962df938891af9ab4775f5224ef8601764107"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/79ebe9110fa458d58f1fceb078e2068d7ad37390"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/b31d237796fd618379ec8e0f4de3370b5e4aeee7"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/cde4b55cfb24522dcbba80bbdb0c082303e76c43"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/1c4962df938891af9ab4775f5224ef8601764107"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/79ebe9110fa458d58f1fceb078e2068d7ad37390"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/b31d237796fd618379ec8e0f4de3370b5e4aeee7"
          },
          {
            "source": "af854a3a-2127-422b-91ae-364da2661108",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/cde4b55cfb24522dcbba80bbdb0c082303e76c43"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Analyzed",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-476"
              }
            ],
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ]
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2025-11-21T14:17:50+00:00",
      "cve": "CVE-2021-46981",
      "id": "CVE-2021-46981",
      "initial_release_date": "2021-01-01T00:00:00+00:00",
      "product_status:known_affected": "42",
      "product_status:known_not_affected": "156",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: nbd: Fix NULL pointer in flush_workqueue",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2021/cve-2021-46981.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-09-03T00:46:56Z",
      "cve": "CVE-2021-46981",
      "id": "CVE-2021-46981",
      "initial_release_date": "2024-03-01T04:08:00Z",
      "product_status:known_affected": "388",
      "product_status:known_not_affected": "238",
      "product_status:recommended": "207",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2021-46981",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2021-46981.json",
      "version": "52"
    },
    "vulnrichment": {
      "containers": {
        "adp": [
          {
            "providerMetadata": {
              "dateUpdated": "2024-08-04T05:24:38.514Z",
              "orgId": "af854a3a-2127-422b-91ae-364da2661108",
              "shortName": "CVE"
            },
            "references": [
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://git.kernel.org/stable/c/1c4962df938891af9ab4775f5224ef8601764107"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://git.kernel.org/stable/c/cde4b55cfb24522dcbba80bbdb0c082303e76c43"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://git.kernel.org/stable/c/b31d237796fd618379ec8e0f4de3370b5e4aeee7"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://git.kernel.org/stable/c/54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc"
              },
              {
                "tags": [
                  "x_transferred"
                ],
                "url": "https://git.kernel.org/stable/c/79ebe9110fa458d58f1fceb078e2068d7ad37390"
              }
            ],
            "title": "CVE Program Container"
          },
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2021-46981",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2024-02-28T19:55:25.767523Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2024-05-23T19:01:13.707Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "defaultStatus": "unaffected",
              "product": "Linux",
              "programFiles": [
                "drivers/block/nbd.c"
              ],
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "vendor": "Linux",
              "versions": [
                {
                  "lessThan": "1c4962df938891af9ab4775f5224ef8601764107",
                  "status": "affected",
                  "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                  "versionType": "git"
                },
                {
                  "lessThan": "cde4b55cfb24522dcbba80bbdb0c082303e76c43",
                  "status": "affected",
                  "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                  "versionType": "git"
                },
                {
                  "lessThan": "b31d237796fd618379ec8e0f4de3370b5e4aeee7",
                  "status": "affected",
                  "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                  "versionType": "git"
                },
                {
                  "lessThan": "54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc",
                  "status": "affected",
                  "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                  "versionType": "git"
                },
                {
                  "lessThan": "79ebe9110fa458d58f1fceb078e2068d7ad37390",
                  "status": "affected",
                  "version": "e9e006f5fcf2bab59149cb38a48a4817c1b538b4",
                  "versionType": "git"
                },
                {
                  "status": "affected",
                  "version": "0b584bf573ae59021069c056c22d65d5721910cb",
                  "versionType": "git"
                },
                {
                  "status": "affected",
                  "version": "9f0f39c92e4f50189155dfb13bb5524372e40eba",
                  "versionType": "git"
                },
                {
                  "status": "affected",
                  "version": "92ec11cccb7fc14331e000ab2337f60aa433433e",
                  "versionType": "git"
                },
                {
                  "lessThan": "4.15",
                  "status": "affected",
                  "version": "4.14.149",
                  "versionType": "semver"
                },
                {
                  "lessThan": "4.20",
                  "status": "affected",
                  "version": "4.19.79",
                  "versionType": "semver"
                },
                {
                  "lessThan": "5.4",
                  "status": "affected",
                  "version": "5.3.6",
                  "versionType": "semver"
                }
              ]
            },
            {
              "defaultStatus": "affected",
              "product": "Linux",
              "programFiles": [
                "drivers/block/nbd.c"
              ],
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "vendor": "Linux",
              "versions": [
                {
                  "status": "affected",
                  "version": "5.4"
                },
                {
                  "lessThan": "5.4",
                  "status": "unaffected",
                  "version": "0",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "5.4.*",
                  "status": "unaffected",
                  "version": "5.4.120",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "5.10.*",
                  "status": "unaffected",
                  "version": "5.10.38",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "5.11.*",
                  "status": "unaffected",
                  "version": "5.11.22",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "5.12.*",
                  "status": "unaffected",
                  "version": "5.12.5",
                  "versionType": "semver"
                },
                {
                  "lessThanOrEqual": "*",
                  "status": "unaffected",
                  "version": "5.13",
                  "versionType": "original_commit_for_fix"
                }
              ]
            }
          ],
          "cpeApplicability": [
            {
              "nodes": [
                {
                  "cpeMatch": [
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "5.4.120",
                      "versionStartIncluding": "5.4",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "5.10.38",
                      "versionStartIncluding": "5.4",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "5.11.22",
                      "versionStartIncluding": "5.4",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "5.12.5",
                      "versionStartIncluding": "5.4",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionEndExcluding": "5.13",
                      "versionStartIncluding": "5.4",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionStartIncluding": "4.14.149",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionStartIncluding": "4.19.79",
                      "vulnerable": true
                    },
                    {
                      "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                      "versionStartIncluding": "5.3.6",
                      "vulnerable": true
                    }
                  ],
                  "negate": false,
                  "operator": "OR"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnbd: Fix NULL pointer in flush_workqueue\n\nOpen /dev/nbdX first, the config_refs will be 1 and\nthe pointers in nbd_device are still null. Disconnect\n/dev/nbdX, then reference a null recv_workq. The\nprotection by config_refs in nbd_genl_disconnect is useless.\n\n[  656.366194] BUG: kernel NULL pointer dereference, address: 0000000000000020\n[  656.368943] #PF: supervisor write access in kernel mode\n[  656.369844] #PF: error_code(0x0002) - not-present page\n[  656.370717] PGD 10cc87067 P4D 10cc87067 PUD 1074b4067 PMD 0\n[  656.371693] Oops: 0002 [#1] SMP\n[  656.372242] CPU: 5 PID: 7977 Comm: nbd-client Not tainted 5.11.0-rc5-00040-g76c057c84d28 #1\n[  656.373661] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014\n[  656.375904] RIP: 0010:mutex_lock+0x29/0x60\n[  656.376627] Code: 00 0f 1f 44 00 00 55 48 89 fd 48 83 05 6f d7 fe 08 01 e8 7a c3 ff ff 48 83 05 6a d7 fe 08 01 31 c0 65 48 8b 14 25 00 6d 01 00 \u003cf0\u003e 48 0f b1 55 d\n[  656.378934] RSP: 0018:ffffc900005eb9b0 EFLAGS: 00010246\n[  656.379350] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000\n[  656.379915] RDX: ffff888104cf2600 RSI: ffffffffaae8f452 RDI: 0000000000000020\n[  656.380473] RBP: 0000000000000020 R08: 0000000000000000 R09: ffff88813bd6b318\n[  656.381039] R10: 00000000000000c7 R11: fefefefefefefeff R12: ffff888102710b40\n[  656.381599] R13: ffffc900005eb9e0 R14: ffffffffb2930680 R15: ffff88810770ef00\n[  656.382166] FS:  00007fdf117ebb40(0000) GS:ffff88813bd40000(0000) knlGS:0000000000000000\n[  656.382806] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n[  656.383261] CR2: 0000000000000020 CR3: 0000000100c84000 CR4: 00000000000006e0\n[  656.383819] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n[  656.384370] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n[  656.384927] Call Trace:\n[  656.385111]  flush_workqueue+0x92/0x6c0\n[  656.385395]  nbd_disconnect_and_put+0x81/0xd0\n[  656.385716]  nbd_genl_disconnect+0x125/0x2a0\n[  656.386034]  genl_family_rcv_msg_doit.isra.0+0x102/0x1b0\n[  656.386422]  genl_rcv_msg+0xfc/0x2b0\n[  656.386685]  ? nbd_ioctl+0x490/0x490\n[  656.386954]  ? genl_family_rcv_msg_doit.isra.0+0x1b0/0x1b0\n[  656.387354]  netlink_rcv_skb+0x62/0x180\n[  656.387638]  genl_rcv+0x34/0x60\n[  656.387874]  netlink_unicast+0x26d/0x590\n[  656.388162]  netlink_sendmsg+0x398/0x6c0\n[  656.388451]  ? netlink_rcv_skb+0x180/0x180\n[  656.388750]  ____sys_sendmsg+0x1da/0x320\n[  656.389038]  ? ____sys_recvmsg+0x130/0x220\n[  656.389334]  ___sys_sendmsg+0x8e/0xf0\n[  656.389605]  ? ___sys_recvmsg+0xa2/0xf0\n[  656.389889]  ? handle_mm_fault+0x1671/0x21d0\n[  656.390201]  __sys_sendmsg+0x6d/0xe0\n[  656.390464]  __x64_sys_sendmsg+0x23/0x30\n[  656.390751]  do_syscall_64+0x45/0x70\n[  656.391017]  entry_SYSCALL_64_after_hwframe+0x44/0xa9\n\nTo fix it, just add if (nbd-\u003erecv_workq) to nbd_disconnect_and_put()."
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-05-23T15:18:51.744Z",
            "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "shortName": "Linux"
          },
          "references": [
            {
              "url": "https://git.kernel.org/stable/c/1c4962df938891af9ab4775f5224ef8601764107"
            },
            {
              "url": "https://git.kernel.org/stable/c/cde4b55cfb24522dcbba80bbdb0c082303e76c43"
            },
            {
              "url": "https://git.kernel.org/stable/c/b31d237796fd618379ec8e0f4de3370b5e4aeee7"
            },
            {
              "url": "https://git.kernel.org/stable/c/54b78ba7e96e5fe1edb8054e375d31a6c0dc60dc"
            },
            {
              "url": "https://git.kernel.org/stable/c/79ebe9110fa458d58f1fceb078e2068d7ad37390"
            }
          ],
          "title": "nbd: Fix NULL pointer in flush_workqueue",
          "x_generator": {
            "engine": "bippy-1.2.0"
          }
        }
      },
      "cveMetadata": {
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "assignerShortName": "Linux",
        "cveId": "CVE-2021-46981",
        "datePublished": "2024-02-28T08:13:10.972Z",
        "dateReserved": "2024-02-27T18:42:55.945Z",
        "dateUpdated": "2026-05-23T15:18:51.744Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…