{
   "containers": {
      "cna": {
         "providerMetadata": {
            "orgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038"
         },
         "descriptions": [
            {
               "lang": "en",
               "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: prevent pt_regs corruption for secondary idle threads\n\nTop of the kernel thread stack should be reserved for pt_regs. However\nthis is not the case for the idle threads of the secondary boot harts.\nTheir stacks overlap with their pt_regs, so both may get corrupted.\n\nSimilar issue has been fixed for the primary hart, see c7cdd96eca28\n(\"riscv: prevent stack corruption by reserving task_pt_regs(p) early\").\nHowever that fix was not propagated to the secondary harts. The problem\nhas been noticed in some CPU hotplug tests with V enabled. The function\nsmp_callin stored several registers on stack, corrupting top of pt_regs\nstructure including status field. As a result, kernel attempted to save\nor restore inexistent V context."
            }
         ],
         "affected": [
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "unaffected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "arch/riscv/kernel/cpu_ops_sbi.c",
                  "arch/riscv/kernel/cpu_ops_spinwait.c"
               ],
               "versions": [
                  {
                     "version": "2875fe056156",
                     "lessThan": "ea22d4195cca",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "2875fe056156",
                     "lessThan": "3090c06d50ea",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "2875fe056156",
                     "lessThan": "0c1f28c32a19",
                     "status": "affected",
                     "versionType": "git"
                  },
                  {
                     "version": "2875fe056156",
                     "lessThan": "a638b0461b58",
                     "status": "affected",
                     "versionType": "git"
                  }
               ]
            },
            {
               "product": "Linux",
               "vendor": "Linux",
               "defaultStatus": "affected",
               "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
               "programFiles": [
                  "arch/riscv/kernel/cpu_ops_sbi.c",
                  "arch/riscv/kernel/cpu_ops_spinwait.c"
               ],
               "versions": [
                  {
                     "version": "5.7",
                     "status": "affected"
                  },
                  {
                     "version": "0",
                     "lessThan": "5.7",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.1.93",
                     "lessThanOrEqual": "6.1.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.6.33",
                     "lessThanOrEqual": "6.6.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.9.4",
                     "lessThanOrEqual": "6.9.*",
                     "status": "unaffected",
                     "versionType": "custom"
                  },
                  {
                     "version": "6.10",
                     "lessThanOrEqual": "*",
                     "status": "unaffected",
                     "versionType": "original_commit_for_fix"
                  }
               ]
            }
         ],
         "references": [
            {
               "url": "https://git.kernel.org/stable/c/ea22d4195cca13d5fdbc4d6555a2dfb8a7867a9e"
            },
            {
               "url": "https://git.kernel.org/stable/c/3090c06d50eaa91317f84bf3eac4c265e6cb8d44"
            },
            {
               "url": "https://git.kernel.org/stable/c/0c1f28c32a194303da630fca89481334b9547b80"
            },
            {
               "url": "https://git.kernel.org/stable/c/a638b0461b58aa3205cd9d5f14d6f703d795b4af"
            }
         ],
         "title": "riscv: prevent pt_regs corruption for secondary idle threads",
         "x_generator": {
            "engine": "bippy-c9c4e1df01b2"
         }
      }
   },
   "cveMetadata": {
      "assignerOrgId": "f4215fc3-5b6b-47ff-a258-f7189bd81038",
      "cveID": "CVE-2024-38667",
      "requesterUserId": "gregkh@kernel.org",
      "serial": "1",
      "state": "PUBLISHED"
   },
   "dataType": "CVE_RECORD",
   "dataVersion": "5.0"
}
