cve-2021-46970
Vulnerability from cvelistv5
Published
2024-02-27 18:47
Modified
2024-08-04 05:17
Severity
Summary
bus: mhi: pci_generic: Remove WQ_MEM_RECLAIM flag from state workqueue
Impacted products
VendorProduct
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2021-46970",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-03-05T22:31:16.861503Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-04T17:13:05.954Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-04T05:17:42.997Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/abd1510c08a13c88d24b622a83c82e87ff1d3135"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/ed541cff35cbdb695f0c98ef506dd7218883fc07"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0fccbf0a3b690b162f53b13ed8bc442ea33437dc"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/bus/mhi/core/init.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "abd1510c08a1",
              "status": "affected",
              "version": "8f7039787687",
              "versionType": "git"
            },
            {
              "lessThan": "ed541cff35cb",
              "status": "affected",
              "version": "8f7039787687",
              "versionType": "git"
            },
            {
              "lessThan": "0fccbf0a3b69",
              "status": "affected",
              "version": "8f7039787687",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/bus/mhi/core/init.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.11"
            },
            {
              "lessThan": "5.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.11.*",
              "status": "unaffected",
              "version": "5.11.20",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.12.*",
              "status": "unaffected",
              "version": "5.12.3",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbus: mhi: pci_generic: Remove WQ_MEM_RECLAIM flag from state workqueue\n\nA recent change created a dedicated workqueue for the state-change work\nwith WQ_HIGHPRI (no strong reason for that) and WQ_MEM_RECLAIM flags,\nbut the state-change work (mhi_pm_st_worker) does not guarantee forward\nprogress under memory pressure, and will even wait on various memory\nallocations when e.g. creating devices, loading firmware, etc... The\nwork is then not part of a memory reclaim path...\n\nMoreover, this causes a warning in check_flush_dependency() since we end\nup in code that flushes a non-reclaim workqueue:\n\n[   40.969601] workqueue: WQ_MEM_RECLAIM mhi_hiprio_wq:mhi_pm_st_worker [mhi] is flushing !WQ_MEM_RECLAIM events_highpri:flush_backlog\n[   40.969612] WARNING: CPU: 4 PID: 158 at kernel/workqueue.c:2607 check_flush_dependency+0x11c/0x140\n[   40.969733] Call Trace:\n[   40.969740]  __flush_work+0x97/0x1d0\n[   40.969745]  ? wake_up_process+0x15/0x20\n[   40.969749]  ? insert_work+0x70/0x80\n[   40.969750]  ? __queue_work+0x14a/0x3e0\n[   40.969753]  flush_work+0x10/0x20\n[   40.969756]  rollback_registered_many+0x1c9/0x510\n[   40.969759]  unregister_netdevice_queue+0x94/0x120\n[   40.969761]  unregister_netdev+0x1d/0x30\n[   40.969765]  mhi_net_remove+0x1a/0x40 [mhi_net]\n[   40.969770]  mhi_driver_remove+0x124/0x250 [mhi]\n[   40.969776]  device_release_driver_internal+0xf0/0x1d0\n[   40.969778]  device_release_driver+0x12/0x20\n[   40.969782]  bus_remove_device+0xe1/0x150\n[   40.969786]  device_del+0x17b/0x3e0\n[   40.969791]  mhi_destroy_device+0x9a/0x100 [mhi]\n[   40.969796]  ? mhi_unmap_single_use_bb+0x50/0x50 [mhi]\n[   40.969799]  device_for_each_child+0x5e/0xa0\n[   40.969804]  mhi_pm_st_worker+0x921/0xf50 [mhi]"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-29T04:59:44.991Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/abd1510c08a13c88d24b622a83c82e87ff1d3135"
        },
        {
          "url": "https://git.kernel.org/stable/c/ed541cff35cbdb695f0c98ef506dd7218883fc07"
        },
        {
          "url": "https://git.kernel.org/stable/c/0fccbf0a3b690b162f53b13ed8bc442ea33437dc"
        }
      ],
      "title": "bus: mhi: pci_generic: Remove WQ_MEM_RECLAIM flag from state workqueue",
      "x_generator": {
        "engine": "bippy-a5840b7849dd"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2021-46970",
    "datePublished": "2024-02-27T18:47:06.071Z",
    "dateReserved": "2024-02-27T18:42:55.943Z",
    "dateUpdated": "2024-08-04T05:17:42.997Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2021-46970\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-02-27T19:04:07.303\",\"lastModified\":\"2024-02-28T14:06:45.783\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nbus: mhi: pci_generic: Remove WQ_MEM_RECLAIM flag from state workqueue\\n\\nA recent change created a dedicated workqueue for the state-change work\\nwith WQ_HIGHPRI (no strong reason for that) and WQ_MEM_RECLAIM flags,\\nbut the state-change work (mhi_pm_st_worker) does not guarantee forward\\nprogress under memory pressure, and will even wait on various memory\\nallocations when e.g. creating devices, loading firmware, etc... The\\nwork is then not part of a memory reclaim path...\\n\\nMoreover, this causes a warning in check_flush_dependency() since we end\\nup in code that flushes a non-reclaim workqueue:\\n\\n[   40.969601] workqueue: WQ_MEM_RECLAIM mhi_hiprio_wq:mhi_pm_st_worker [mhi] is flushing !WQ_MEM_RECLAIM events_highpri:flush_backlog\\n[   40.969612] WARNING: CPU: 4 PID: 158 at kernel/workqueue.c:2607 check_flush_dependency+0x11c/0x140\\n[   40.969733] Call Trace:\\n[   40.969740]  __flush_work+0x97/0x1d0\\n[   40.969745]  ? wake_up_process+0x15/0x20\\n[   40.969749]  ? insert_work+0x70/0x80\\n[   40.969750]  ? __queue_work+0x14a/0x3e0\\n[   40.969753]  flush_work+0x10/0x20\\n[   40.969756]  rollback_registered_many+0x1c9/0x510\\n[   40.969759]  unregister_netdevice_queue+0x94/0x120\\n[   40.969761]  unregister_netdev+0x1d/0x30\\n[   40.969765]  mhi_net_remove+0x1a/0x40 [mhi_net]\\n[   40.969770]  mhi_driver_remove+0x124/0x250 [mhi]\\n[   40.969776]  device_release_driver_internal+0xf0/0x1d0\\n[   40.969778]  device_release_driver+0x12/0x20\\n[   40.969782]  bus_remove_device+0xe1/0x150\\n[   40.969786]  device_del+0x17b/0x3e0\\n[   40.969791]  mhi_destroy_device+0x9a/0x100 [mhi]\\n[   40.969796]  ? mhi_unmap_single_use_bb+0x50/0x50 [mhi]\\n[   40.969799]  device_for_each_child+0x5e/0xa0\\n[   40.969804]  mhi_pm_st_worker+0x921/0xf50 [mhi]\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bus: mhi: pci_generic: Eliminar el indicador WQ_MEM_RECLAIM de la cola de trabajo de estado Un cambio reciente cre\u00f3 una cola de trabajo dedicada para el trabajo de cambio de estado con los indicadores WQ_HIGHPRI (sin ninguna raz\u00f3n importante para ello) y WQ_MEM_RECLAIM. pero el trabajo de cambio de estado (mhi_pm_st_worker) no garantiza el progreso hacia adelante bajo presi\u00f3n de la memoria, e incluso esperar\u00e1 varias asignaciones de memoria cuando, por ejemplo, se crean dispositivos, se carga firmware, etc... El trabajo entonces no forma parte de una ruta de recuperaci\u00f3n de memoria. .. Adem\u00e1s, esto provoca una advertencia en check_flush_dependency() ya que terminamos en un c\u00f3digo que vac\u00eda una cola de trabajo que no es de recuperaci\u00f3n: [ 40.969601] cola de trabajo: WQ_MEM_RECLAIM mhi_hiprio_wq:mhi_pm_st_worker [mhi] est\u00e1 descargando !WQ_MEM_RECLAIM events_highpri:flush_backlog [ 40.969612] ADVERTENCIA : CPU: 4 PID: 158 en kernel/workqueue.c:2607 check_flush_dependency+0x11c/0x140 [40.969733] Seguimiento de llamadas: [40.969740] __flush_work+0x97/0x1d0 [40.969745]? proceso_despertador+0x15/0x20 [40.969749]? insertar_trabajo+0x70/0x80 [40.969750]? __queue_work+0x14a/0x3e0 [ 40.969753] Flush_work+0x10/0x20 [ 40.969756] rollback_registered_many+0x1c9/0x510 [ 40.969759] unregister_netdevice_queue+0x94/0x120 [ 40.969761] anular el registro _netdev+0x1d/0x30 [ 40.969765] mhi_net_remove+0x1a/0x40 [mhi_net] [ 40.969770 ] mhi_driver_remove+0x124/0x250 [mhi] [ 40.969776] dispositivo_release_driver_internal+0xf0/0x1d0 [ 40.969778] dispositivo_release_driver+0x12/0x20 [ 40.969782] bus_remove_device+0xe1/0x150 [ 40.9 69786] dispositivo_del+0x17b/0x3e0 [ 40.969791] mhi_destroy_device+0x9a/0x100 [ mhi] [40.969796]? mhi_unmap_single_use_bb+0x50/0x50 [mhi] [ 40.969799] dispositivo_para_cada_ni\u00f1o+0x5e/0xa0 [ 40.969804] mhi_pm_st_worker+0x921/0xf50 [mhi]\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0fccbf0a3b690b162f53b13ed8bc442ea33437dc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/abd1510c08a13c88d24b622a83c82e87ff1d3135\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ed541cff35cbdb695f0c98ef506dd7218883fc07\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...