cve-2022-48721
Vulnerability from cvelistv5
Published
2024-06-20 11:13
Modified
2024-09-11 17:34
Severity ?
Summary
net/smc: Forward wakeup to smc socket waitqueue after fallback
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-03T15:25:00.192Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0ef6049f664941bc0f75828b3a61877635048b27"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/504078fbe9dd570d685361b57784a6050bc40aaa"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/341adeec9adad0874f29a0a1af35638207352a39"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2022-48721",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T17:11:16.258278Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:34:49.624Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/smc/af_smc.c",
            "net/smc/smc.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "0ef6049f6649",
              "status": "affected",
              "version": "fb92e025baa7",
              "versionType": "git"
            },
            {
              "lessThan": "504078fbe9dd",
              "status": "affected",
              "version": "2153bd1e3d3d",
              "versionType": "git"
            },
            {
              "lessThan": "341adeec9ada",
              "status": "affected",
              "version": "2153bd1e3d3d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/smc/af_smc.c",
            "net/smc/smc.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.16"
            },
            {
              "lessThan": "5.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.22",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "5.16.*",
              "status": "unaffected",
              "version": "5.16.8",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnet/smc: Forward wakeup to smc socket waitqueue after fallback\n\nWhen we replace TCP with SMC and a fallback occurs, there may be\nsome socket waitqueue entries remaining in smc socket-\u003ewq, such\nas eppoll_entries inserted by userspace applications.\n\nAfter the fallback, data flows over TCP/IP and only clcsocket-\u003ewq\nwill be woken up. Applications can\u0027t be notified by the entries\nwhich were inserted in smc socket-\u003ewq before fallback. So we need\na mechanism to wake up smc socket-\u003ewq at the same time if some\nentries remaining in it.\n\nThe current workaround is to transfer the entries from smc socket-\u003ewq\nto clcsock-\u003ewq during the fallback. But this may cause a crash\nlike this:\n\n general protection fault, probably for non-canonical address 0xdead000000000100: 0000 [#1] PREEMPT SMP PTI\n CPU: 3 PID: 0 Comm: swapper/3 Kdump: loaded Tainted: G E     5.16.0+ #107\n RIP: 0010:__wake_up_common+0x65/0x170\n Call Trace:\n  \u003cIRQ\u003e\n  __wake_up_common_lock+0x7a/0xc0\n  sock_def_readable+0x3c/0x70\n  tcp_data_queue+0x4a7/0xc40\n  tcp_rcv_established+0x32f/0x660\n  ? sk_filter_trim_cap+0xcb/0x2e0\n  tcp_v4_do_rcv+0x10b/0x260\n  tcp_v4_rcv+0xd2a/0xde0\n  ip_protocol_deliver_rcu+0x3b/0x1d0\n  ip_local_deliver_finish+0x54/0x60\n  ip_local_deliver+0x6a/0x110\n  ? tcp_v4_early_demux+0xa2/0x140\n  ? tcp_v4_early_demux+0x10d/0x140\n  ip_sublist_rcv_finish+0x49/0x60\n  ip_sublist_rcv+0x19d/0x230\n  ip_list_rcv+0x13e/0x170\n  __netif_receive_skb_list_core+0x1c2/0x240\n  netif_receive_skb_list_internal+0x1e6/0x320\n  napi_complete_done+0x11d/0x190\n  mlx5e_napi_poll+0x163/0x6b0 [mlx5_core]\n  __napi_poll+0x3c/0x1b0\n  net_rx_action+0x27c/0x300\n  __do_softirq+0x114/0x2d2\n  irq_exit_rcu+0xb4/0xe0\n  common_interrupt+0xba/0xe0\n  \u003c/IRQ\u003e\n  \u003cTASK\u003e\n\nThe crash is caused by privately transferring waitqueue entries from\nsmc socket-\u003ewq to clcsock-\u003ewq. The owners of these entries, such as\nepoll, have no idea that the entries have been transferred to a\ndifferent socket wait queue and still use original waitqueue spinlock\n(smc socket-\u003ewq.wait.lock) to make the entries operation exclusive,\nbut it doesn\u0027t work. The operations to the entries, such as removing\nfrom the waitqueue (now is clcsock-\u003ewq after fallback), may cause a\ncrash when clcsock waitqueue is being iterated over at the moment.\n\nThis patch tries to fix this by no longer transferring wait queue\nentries privately, but introducing own implementations of clcsock\u0027s\ncallback functions in fallback situation. The callback functions will\nforward the wakeup to smc socket-\u003ewq if clcsock-\u003ewq is actually woken\nup and smc socket-\u003ewq has remaining entries."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-06-20T11:14:09.064Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/0ef6049f664941bc0f75828b3a61877635048b27"
        },
        {
          "url": "https://git.kernel.org/stable/c/504078fbe9dd570d685361b57784a6050bc40aaa"
        },
        {
          "url": "https://git.kernel.org/stable/c/341adeec9adad0874f29a0a1af35638207352a39"
        }
      ],
      "title": "net/smc: Forward wakeup to smc socket waitqueue after fallback",
      "x_generator": {
        "engine": "bippy-7d53e8ef8be4"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-48721",
    "datePublished": "2024-06-20T11:13:12.668Z",
    "dateReserved": "2024-06-20T11:09:39.051Z",
    "dateUpdated": "2024-09-11T17:34:49.624Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-48721\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-06-20T11:15:55.620\",\"lastModified\":\"2024-06-20T12:43:25.663\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnet/smc: Forward wakeup to smc socket waitqueue after fallback\\n\\nWhen we replace TCP with SMC and a fallback occurs, there may be\\nsome socket waitqueue entries remaining in smc socket-\u003ewq, such\\nas eppoll_entries inserted by userspace applications.\\n\\nAfter the fallback, data flows over TCP/IP and only clcsocket-\u003ewq\\nwill be woken up. Applications can\u0027t be notified by the entries\\nwhich were inserted in smc socket-\u003ewq before fallback. So we need\\na mechanism to wake up smc socket-\u003ewq at the same time if some\\nentries remaining in it.\\n\\nThe current workaround is to transfer the entries from smc socket-\u003ewq\\nto clcsock-\u003ewq during the fallback. But this may cause a crash\\nlike this:\\n\\n general protection fault, probably for non-canonical address 0xdead000000000100: 0000 [#1] PREEMPT SMP PTI\\n CPU: 3 PID: 0 Comm: swapper/3 Kdump: loaded Tainted: G E     5.16.0+ #107\\n RIP: 0010:__wake_up_common+0x65/0x170\\n Call Trace:\\n  \u003cIRQ\u003e\\n  __wake_up_common_lock+0x7a/0xc0\\n  sock_def_readable+0x3c/0x70\\n  tcp_data_queue+0x4a7/0xc40\\n  tcp_rcv_established+0x32f/0x660\\n  ? sk_filter_trim_cap+0xcb/0x2e0\\n  tcp_v4_do_rcv+0x10b/0x260\\n  tcp_v4_rcv+0xd2a/0xde0\\n  ip_protocol_deliver_rcu+0x3b/0x1d0\\n  ip_local_deliver_finish+0x54/0x60\\n  ip_local_deliver+0x6a/0x110\\n  ? tcp_v4_early_demux+0xa2/0x140\\n  ? tcp_v4_early_demux+0x10d/0x140\\n  ip_sublist_rcv_finish+0x49/0x60\\n  ip_sublist_rcv+0x19d/0x230\\n  ip_list_rcv+0x13e/0x170\\n  __netif_receive_skb_list_core+0x1c2/0x240\\n  netif_receive_skb_list_internal+0x1e6/0x320\\n  napi_complete_done+0x11d/0x190\\n  mlx5e_napi_poll+0x163/0x6b0 [mlx5_core]\\n  __napi_poll+0x3c/0x1b0\\n  net_rx_action+0x27c/0x300\\n  __do_softirq+0x114/0x2d2\\n  irq_exit_rcu+0xb4/0xe0\\n  common_interrupt+0xba/0xe0\\n  \u003c/IRQ\u003e\\n  \u003cTASK\u003e\\n\\nThe crash is caused by privately transferring waitqueue entries from\\nsmc socket-\u003ewq to clcsock-\u003ewq. The owners of these entries, such as\\nepoll, have no idea that the entries have been transferred to a\\ndifferent socket wait queue and still use original waitqueue spinlock\\n(smc socket-\u003ewq.wait.lock) to make the entries operation exclusive,\\nbut it doesn\u0027t work. The operations to the entries, such as removing\\nfrom the waitqueue (now is clcsock-\u003ewq after fallback), may cause a\\ncrash when clcsock waitqueue is being iterated over at the moment.\\n\\nThis patch tries to fix this by no longer transferring wait queue\\nentries privately, but introducing own implementations of clcsock\u0027s\\ncallback functions in fallback situation. The callback functions will\\nforward the wakeup to smc socket-\u003ewq if clcsock-\u003ewq is actually woken\\nup and smc socket-\u003ewq has remaining entries.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net/smc: Reenviar activaci\u00f3n a la cola de espera del socket smc despu\u00e9s del respaldo Cuando reemplazamos TCP con SMC y se produce un respaldo, es posible que queden algunas entradas de la cola de espera del socket en el socket smc-\u0026gt;wq. como eppoll_entries insertados por aplicaciones de espacio de usuario. Despu\u00e9s del respaldo, los datos fluyen a trav\u00e9s de TCP/IP y solo se activar\u00e1 clcsocket-\u0026gt;wq. Las aplicaciones no pueden ser notificadas por las entradas que se insertaron en smc socket-\u0026gt;wq antes del respaldo. Entonces necesitamos un mecanismo para activar smc socket-\u0026gt;wq al mismo tiempo si quedan algunas entradas en \u00e9l. La soluci\u00f3n actual es transferir las entradas de smc socket-\u0026gt;wq a clcsock-\u0026gt;wq durante el respaldo. Pero esto puede causar un fallo como este: fallo de protecci\u00f3n general, probablemente para la direcci\u00f3n no can\u00f3nica 0xdead000000000100: 0000 [#1] PREEMPT SMP PTI CPU: 3 PID: 0 Comm: swapper/3 Kdump: cargado Contaminado: GE 5.16.0+ #107 RIP: 0010:__wake_up_common+0x65/0x170 Seguimiento de llamadas:  __wake_up_common_lock+0x7a/0xc0 sock_def_readable+0x3c/0x70 tcp_data_queue+0x4a7/0xc40 tcp_rcv_establecido+0x32f/0x660 ? sk_filter_trim_cap+0xcb/0x2e0 tcp_v4_do_rcv+0x10b/0x260 tcp_v4_rcv+0xd2a/0xde0 ip_protocol_deliver_rcu+0x3b/0x1d0 ip_local_deliver_finish+0x54/0x60 0 ? tcp_v4_early_demux+0xa2/0x140? tcp_v4_early_demux+0x10d/0x140 ip_sublist_rcv_finish+0x49/0x60 ip_sublist_rcv+0x19d/0x230 ip_list_rcv+0x13e/0x170 __netif_receive_skb_list_core+0x1c2/0x240 netif_receive_skb_list_ interno+0x1e6/0x320 napi_complete_done+0x11d/0x190 mlx5e_napi_poll+0x163/0x6b0 [mlx5_core] __napi_poll+0x3c/0x1b0 net_rx_action+ 0x27c/0x300 __do_softirq+0x114/0x2d2 irq_exit_rcu+0xb4/0xe0 common_interrupt+0xba/0xe0   El bloqueo se debe a la transferencia privada de entradas de la cola de espera desde smc socket-\u0026gt;wq a clcsock-\u0026gt;wq. Los propietarios de estas entradas, como epoll, no tienen idea de que las entradas se han transferido a una cola de espera de socket diferente y a\u00fan usan el spinlock de cola de espera original (smc socket-\u0026gt;wq.wait.lock) para que la operaci\u00f3n de entradas sea exclusiva, pero no funciona. Las operaciones realizadas en las entradas, como la eliminaci\u00f3n de la cola de espera (ahora es clcsock-\u0026gt;wq despu\u00e9s del respaldo), pueden causar un bloqueo cuando se est\u00e1 iterando sobre la cola de espera de clcsock en este momento. Este parche intenta solucionar este problema al no transferir las entradas de la cola de espera de forma privada, sino al introducir implementaciones propias de las funciones de devoluci\u00f3n de llamada de clcsock en situaciones de reserva. Las funciones de devoluci\u00f3n de llamada reenviar\u00e1n la activaci\u00f3n a smc socket-\u0026gt;wq si clcsock-\u0026gt;wq realmente se activa y smc socket-\u0026gt;wq tiene entradas restantes.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0ef6049f664941bc0f75828b3a61877635048b27\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/341adeec9adad0874f29a0a1af35638207352a39\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/504078fbe9dd570d685361b57784a6050bc40aaa\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...