cve-2023-52874
Vulnerability from cvelistv5
Published
2024-05-21 15:32
Modified
2024-12-19 08:27
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro In the TDX_HYPERCALL asm, after the TDCALL instruction returns from the untrusted VMM, the registers that the TDX guest shares to the VMM need to be cleared to avoid speculative execution of VMM-provided values. RSI is specified in the bitmap of those registers, but it is missing when zeroing out those registers in the current TDX_HYPERCALL. It was there when it was originally added in commit 752d13305c78 ("x86/tdx: Expand __tdx_hypercall() to handle more arguments"), but was later removed in commit 1e70c680375a ("x86/tdx: Do not corrupt frame-pointer in __tdx_hypercall()"), which was correct because %rsi is later restored in the "pop %rsi". However a later commit 7a3a401874be ("x86/tdx: Drop flags from __tdx_hypercall()") removed that "pop %rsi" but forgot to add the "xor %rsi, %rsi" back. Fix by adding it back.
Impacted products
Vendor Product Version
Linux Linux Version: 6.4
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T23:11:36.236Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/2191950d35d8f81620ea8d4e04d983f664fe3a8a"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/de4c5bacca4f50233f1f791bec9eeb4dee1b14cd"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/5d092b66119d774853cc9308522620299048a662"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2023-52874",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T15:36:24.980070Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:32:54.047Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/coco/tdx/tdcall.S"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "2191950d35d8f81620ea8d4e04d983f664fe3a8a",
              "status": "affected",
              "version": "7a3a401874bea02f568aa416ac29170d8cde0dc2",
              "versionType": "git"
            },
            {
              "lessThan": "de4c5bacca4f50233f1f791bec9eeb4dee1b14cd",
              "status": "affected",
              "version": "7a3a401874bea02f568aa416ac29170d8cde0dc2",
              "versionType": "git"
            },
            {
              "lessThan": "5d092b66119d774853cc9308522620299048a662",
              "status": "affected",
              "version": "7a3a401874bea02f568aa416ac29170d8cde0dc2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "arch/x86/coco/tdx/tdcall.S"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.4"
            },
            {
              "lessThan": "6.4",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.5.*",
              "status": "unaffected",
              "version": "6.5.12",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.7",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nx86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro\n\nIn the TDX_HYPERCALL asm, after the TDCALL instruction returns from the\nuntrusted VMM, the registers that the TDX guest shares to the VMM need\nto be cleared to avoid speculative execution of VMM-provided values.\n\nRSI is specified in the bitmap of those registers, but it is missing\nwhen zeroing out those registers in the current TDX_HYPERCALL.\n\nIt was there when it was originally added in commit 752d13305c78\n(\"x86/tdx: Expand __tdx_hypercall() to handle more arguments\"), but was\nlater removed in commit 1e70c680375a (\"x86/tdx: Do not corrupt\nframe-pointer in __tdx_hypercall()\"), which was correct because %rsi is\nlater restored in the \"pop %rsi\".  However a later commit 7a3a401874be\n(\"x86/tdx: Drop flags from __tdx_hypercall()\") removed that \"pop %rsi\"\nbut forgot to add the \"xor %rsi, %rsi\" back.\n\nFix by adding it back."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T08:27:40.607Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/2191950d35d8f81620ea8d4e04d983f664fe3a8a"
        },
        {
          "url": "https://git.kernel.org/stable/c/de4c5bacca4f50233f1f791bec9eeb4dee1b14cd"
        },
        {
          "url": "https://git.kernel.org/stable/c/5d092b66119d774853cc9308522620299048a662"
        }
      ],
      "title": "x86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2023-52874",
    "datePublished": "2024-05-21T15:32:07.937Z",
    "dateReserved": "2024-05-21T15:19:24.264Z",
    "dateUpdated": "2024-12-19T08:27:40.607Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2023-52874\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-05-21T16:15:24.157\",\"lastModified\":\"2024-11-21T08:40:46.467\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nx86/tdx: Zero out the missing RSI in TDX_HYPERCALL macro\\n\\nIn the TDX_HYPERCALL asm, after the TDCALL instruction returns from the\\nuntrusted VMM, the registers that the TDX guest shares to the VMM need\\nto be cleared to avoid speculative execution of VMM-provided values.\\n\\nRSI is specified in the bitmap of those registers, but it is missing\\nwhen zeroing out those registers in the current TDX_HYPERCALL.\\n\\nIt was there when it was originally added in commit 752d13305c78\\n(\\\"x86/tdx: Expand __tdx_hypercall() to handle more arguments\\\"), but was\\nlater removed in commit 1e70c680375a (\\\"x86/tdx: Do not corrupt\\nframe-pointer in __tdx_hypercall()\\\"), which was correct because %rsi is\\nlater restored in the \\\"pop %rsi\\\".  However a later commit 7a3a401874be\\n(\\\"x86/tdx: Drop flags from __tdx_hypercall()\\\") removed that \\\"pop %rsi\\\"\\nbut forgot to add the \\\"xor %rsi, %rsi\\\" back.\\n\\nFix by adding it back.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: x86/tdx: Ponga a cero el RSI que falta en la macro TDX_HYPERCALL. En el conjunto TDX_HYPERCALL, despu\u00e9s de que la instrucci\u00f3n TDCALL regresa del VMM que no es de confianza, los registros que el invitado TDX comparte con el VMM necesitan debe borrarse para evitar la ejecuci\u00f3n especulativa de los valores proporcionados por VMM. RSI se especifica en el mapa de bits de esos registros, pero falta al poner a cero esos registros en el TDX_HYPERCALL actual. Estaba all\u00ed cuando se agreg\u00f3 originalmente en la confirmaci\u00f3n 752d13305c78 (\\\"x86/tdx: Expand__tdx_hypercall() to handle more arguments\\\"), pero luego se elimin\u00f3 en la confirmaci\u00f3n 1e70c680375a (\\\"x86/tdx: Do not corrupt frame-pointer in __tdx_hypercall( )\\\"), lo cual era correcto porque %rsi se restaura posteriormente en el \\\"pop %rsi\\\". Sin embargo, una confirmaci\u00f3n posterior 7a3a401874be (\\\"x86/tdx: Drop flags from __tdx_hypercall()\\\") elimin\u00f3 ese \\\"pop %rsi\\\" pero olvid\u00f3 volver a agregar \\\"xor %rsi, %rsi\\\". Solucionadlo volvi\u00e9ndolo a agregar.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2191950d35d8f81620ea8d4e04d983f664fe3a8a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5d092b66119d774853cc9308522620299048a662\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/de4c5bacca4f50233f1f791bec9eeb4dee1b14cd\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/2191950d35d8f81620ea8d4e04d983f664fe3a8a\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/5d092b66119d774853cc9308522620299048a662\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"},{\"url\":\"https://git.kernel.org/stable/c/de4c5bacca4f50233f1f791bec9eeb4dee1b14cd\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}"
  }
}


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.