cve-2024-38613
Vulnerability from cvelistv5
Published
2024-06-19 13:56
Modified
2024-11-05 09:30
Severity ?
Summary
m68k: Fix spinlock race in kernel thread creation
Impacted products
Vendor Product Version
Linux Linux Version: 3.7
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T04:12:26.119Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/5213cc01d0464c011fdc09f318705603ed3a746b"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/4eeffecc8e3cce25bb559502c2fd94a948bcde82"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/77b2b67a0f8bce260c53907e5749d61466d90c87"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/f3baf0f4f92af32943ebf27b960e0552c6c082fd"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/f1d4274a84c069be0f6098ab10c3443fc1f7134c"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/95f00caf767b5968c2c51083957b38be4748a78a"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/da89ce46f02470ef08f0f580755d14d547da59ed"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-38613",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T17:13:02.380696Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:34:53.381Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/m68k/kernel/entry.S"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "2a8d1d95302c",
              "status": "affected",
              "version": "533e6903bea0",
              "versionType": "git"
            },
            {
              "lessThan": "5213cc01d046",
              "status": "affected",
              "version": "533e6903bea0",
              "versionType": "git"
            },
            {
              "lessThan": "4eeffecc8e3c",
              "status": "affected",
              "version": "533e6903bea0",
              "versionType": "git"
            },
            {
              "lessThan": "77b2b67a0f8b",
              "status": "affected",
              "version": "533e6903bea0",
              "versionType": "git"
            },
            {
              "lessThan": "0d9ae1253535",
              "status": "affected",
              "version": "533e6903bea0",
              "versionType": "git"
            },
            {
              "lessThan": "f3baf0f4f92a",
              "status": "affected",
              "version": "533e6903bea0",
              "versionType": "git"
            },
            {
              "lessThan": "f1d4274a84c0",
              "status": "affected",
              "version": "533e6903bea0",
              "versionType": "git"
            },
            {
              "lessThan": "95f00caf767b",
              "status": "affected",
              "version": "533e6903bea0",
              "versionType": "git"
            },
            {
              "lessThan": "da89ce46f024",
              "status": "affected",
              "version": "533e6903bea0",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/m68k/kernel/entry.S"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.7"
            },
            {
              "lessThan": "3.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.316",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.278",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.219",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.161",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.93",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.33",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.8.*",
              "status": "unaffected",
              "version": "6.8.12",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.9.*",
              "status": "unaffected",
              "version": "6.9.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.10",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nm68k: Fix spinlock race in kernel thread creation\n\nContext switching does take care to retain the correct lock owner across\nthe switch from \u0027prev\u0027 to \u0027next\u0027 tasks.  This does rely on interrupts\nremaining disabled for the entire duration of the switch.\n\nThis condition is guaranteed for normal process creation and context\nswitching between already running processes, because both \u0027prev\u0027 and\n\u0027next\u0027 already have interrupts disabled in their saved copies of the\nstatus register.\n\nThe situation is different for newly created kernel threads.  The status\nregister is set to PS_S in copy_thread(), which does leave the IPL at 0.\nUpon restoring the \u0027next\u0027 thread\u0027s status register in switch_to() aka\nresume(), interrupts then become enabled prematurely.  resume() then\nreturns via ret_from_kernel_thread() and schedule_tail() where run queue\nlock is released (see finish_task_switch() and finish_lock_switch()).\n\nA timer interrupt calling scheduler_tick() before the lock is released\nin finish_task_switch() will find the lock already taken, with the\ncurrent task as lock owner.  This causes a spinlock recursion warning as\nreported by Guenter Roeck.\n\nAs far as I can ascertain, this race has been opened in commit\n533e6903bea0 (\"m68k: split ret_from_fork(), simplify kernel_thread()\")\nbut I haven\u0027t done a detailed study of kernel history so it may well\npredate that commit.\n\nInterrupts cannot be disabled in the saved status register copy for\nkernel threads (init will complain about interrupts disabled when\nfinally starting user space).  Disable interrupts temporarily when\nswitching the tasks\u0027 register sets in resume().\n\nNote that a simple oriw 0x700,%sr after restoring sr is not enough here\n- this leaves enough of a race for the \u0027spinlock recursion\u0027 warning to\nstill be observed.\n\nTested on ARAnyM and qemu (Quadra 800 emulation)."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-11-05T09:30:58.099Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14"
        },
        {
          "url": "https://git.kernel.org/stable/c/5213cc01d0464c011fdc09f318705603ed3a746b"
        },
        {
          "url": "https://git.kernel.org/stable/c/4eeffecc8e3cce25bb559502c2fd94a948bcde82"
        },
        {
          "url": "https://git.kernel.org/stable/c/77b2b67a0f8bce260c53907e5749d61466d90c87"
        },
        {
          "url": "https://git.kernel.org/stable/c/0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0"
        },
        {
          "url": "https://git.kernel.org/stable/c/f3baf0f4f92af32943ebf27b960e0552c6c082fd"
        },
        {
          "url": "https://git.kernel.org/stable/c/f1d4274a84c069be0f6098ab10c3443fc1f7134c"
        },
        {
          "url": "https://git.kernel.org/stable/c/95f00caf767b5968c2c51083957b38be4748a78a"
        },
        {
          "url": "https://git.kernel.org/stable/c/da89ce46f02470ef08f0f580755d14d547da59ed"
        }
      ],
      "title": "m68k: Fix spinlock race in kernel thread creation",
      "x_generator": {
        "engine": "bippy-9e1c9544281a"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-38613",
    "datePublished": "2024-06-19T13:56:14.083Z",
    "dateReserved": "2024-06-18T19:36:34.944Z",
    "dateUpdated": "2024-11-05T09:30:58.099Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-38613\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-06-19T14:15:21.147\",\"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\\nm68k: Fix spinlock race in kernel thread creation\\n\\nContext switching does take care to retain the correct lock owner across\\nthe switch from \u0027prev\u0027 to \u0027next\u0027 tasks.  This does rely on interrupts\\nremaining disabled for the entire duration of the switch.\\n\\nThis condition is guaranteed for normal process creation and context\\nswitching between already running processes, because both \u0027prev\u0027 and\\n\u0027next\u0027 already have interrupts disabled in their saved copies of the\\nstatus register.\\n\\nThe situation is different for newly created kernel threads.  The status\\nregister is set to PS_S in copy_thread(), which does leave the IPL at 0.\\nUpon restoring the \u0027next\u0027 thread\u0027s status register in switch_to() aka\\nresume(), interrupts then become enabled prematurely.  resume() then\\nreturns via ret_from_kernel_thread() and schedule_tail() where run queue\\nlock is released (see finish_task_switch() and finish_lock_switch()).\\n\\nA timer interrupt calling scheduler_tick() before the lock is released\\nin finish_task_switch() will find the lock already taken, with the\\ncurrent task as lock owner.  This causes a spinlock recursion warning as\\nreported by Guenter Roeck.\\n\\nAs far as I can ascertain, this race has been opened in commit\\n533e6903bea0 (\\\"m68k: split ret_from_fork(), simplify kernel_thread()\\\")\\nbut I haven\u0027t done a detailed study of kernel history so it may well\\npredate that commit.\\n\\nInterrupts cannot be disabled in the saved status register copy for\\nkernel threads (init will complain about interrupts disabled when\\nfinally starting user space).  Disable interrupts temporarily when\\nswitching the tasks\u0027 register sets in resume().\\n\\nNote that a simple oriw 0x700,%sr after restoring sr is not enough here\\n- this leaves enough of a race for the \u0027spinlock recursion\u0027 warning to\\nstill be observed.\\n\\nTested on ARAnyM and qemu (Quadra 800 emulation).\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: m68k: corrige la ejecuci\u00f3n de bloqueo de giro en la creaci\u00f3n de subprocesos del kernel. El cambio de contexto se encarga de retener el propietario del bloqueo correcto durante el cambio de las tareas \u0027anteriores\u0027 a las \u0027siguientes\u0027. Esto depende de que las interrupciones permanezcan deshabilitadas durante toda la duraci\u00f3n del cambio. Esta condici\u00f3n est\u00e1 garantizada para la creaci\u00f3n normal de procesos y el cambio de contexto entre procesos que ya se est\u00e1n ejecutando, porque tanto \u0027anterior\u0027 como \u0027siguiente\u0027 ya tienen las interrupciones deshabilitadas en sus copias guardadas del registro de estado. La situaci\u00f3n es diferente para los subprocesos del kernel reci\u00e9n creados. El registro de estado se establece en PS_S en copy_thread(), lo que deja la IPL en 0. Al restaurar el registro de estado del \u0027siguiente\u0027 subproceso en switch_to() tambi\u00e9n conocido como resume(), las interrupciones se habilitan prematuramente. resume() luego regresa a trav\u00e9s de ret_from_kernel_thread() y Schedule_tail() donde se libera el bloqueo de la cola de ejecuci\u00f3n (consulte Finish_task_switch() y Finish_lock_switch()). Una interrupci\u00f3n del temporizador que llama a Scheduler_tick() antes de que se libere el bloqueo en Finish_task_switch() encontrar\u00e1 el bloqueo ya tomado, con la tarea actual como propietario del bloqueo. Esto provoca una advertencia de recursividad de spinlock seg\u00fan lo informado por Guenter Roeck. Hasta donde puedo determinar, esta ejecuci\u00f3n se abri\u00f3 en el commit 533e6903bea0 (\\\"m68k: split ret_from_fork(), simplifica kernel_thread()\\\") pero no he realizado un estudio detallado de la historia del kernel, por lo que es posible que sea anterior a esa confirmaci\u00f3n. Las interrupciones no se pueden deshabilitar en la copia del registro de estado guardado para los subprocesos del kernel (init se quejar\u00e1 de las interrupciones deshabilitadas cuando finalmente inicie el espacio de usuario). Deshabilite las interrupciones temporalmente al cambiar los conjuntos de registros de tareas en resume(). Tenga en cuenta que un simple oriw 0x700,%sr despu\u00e9s de restaurar sr no es suficiente aqu\u00ed; esto deja suficiente ejecuci\u00f3n para que a\u00fan se observe la advertencia de \u0027recursi\u00f3n de spinlock\u0027. Probado en ARAnyM y qemu (emulaci\u00f3n Quadra 800).\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/0d9ae1253535f6e85a016e09c25ecbe6f7f59ef0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2a8d1d95302c7d52c6ac8fa5cb4a6948ae0d3a14\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/4eeffecc8e3cce25bb559502c2fd94a948bcde82\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5213cc01d0464c011fdc09f318705603ed3a746b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/77b2b67a0f8bce260c53907e5749d61466d90c87\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/95f00caf767b5968c2c51083957b38be4748a78a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/da89ce46f02470ef08f0f580755d14d547da59ed\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f1d4274a84c069be0f6098ab10c3443fc1f7134c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f3baf0f4f92af32943ebf27b960e0552c6c082fd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.