CVE-2022-49518 (GCVE-0-2022-49518)
Vulnerability from cvelistv5
Published
2025-02-26 02:13
Modified
2025-05-04 08:39
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: ASoC: SOF: ipc3-topology: Correct get_control_data for non bytes payload It is possible to craft a topology where sof_get_control_data() would do out of bounds access because it expects that it is only called when the payload is bytes type. Confusingly it also handles other types of controls, but the payload parsing implementation is only valid for bytes. Fix the code to count the non bytes controls and instead of storing a pointer to sof_abi_hdr in sof_widget_data (which is only valid for bytes), store the pointer to the data itself and add a new member to save the size of the data. In case of non bytes controls we store the pointer to the chanv itself, which is just an array of values at the end. In case of bytes control, drop the wrong cdata->data (wdata[i].pdata) check against NULL since it is incorrect and invalid in this context. The data is pointing to the end of cdata struct, so it should never be null.
Impacted products
Vendor Product Version
Linux Linux Version: 7006d20e5e9d25c079a82e2bc0ea7e292fdea6e6
Version: 7006d20e5e9d25c079a82e2bc0ea7e292fdea6e6
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "sound/soc/sof/ipc3-topology.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "896b03bb7c7010042786cfae2115083d4c241dd3",
              "status": "affected",
              "version": "7006d20e5e9d25c079a82e2bc0ea7e292fdea6e6",
              "versionType": "git"
            },
            {
              "lessThan": "a962890a5a3cce903ff7c7a19fadee63ed9efdc7",
              "status": "affected",
              "version": "7006d20e5e9d25c079a82e2bc0ea7e292fdea6e6",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "sound/soc/sof/ipc3-topology.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.18"
            },
            {
              "lessThan": "5.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.18.*",
              "status": "unaffected",
              "version": "5.18.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.19",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18.3",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19",
                  "versionStartIncluding": "5.18",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nASoC: SOF: ipc3-topology: Correct get_control_data for non bytes payload\n\nIt is possible to craft a topology where sof_get_control_data() would do\nout of bounds access because it expects that it is only called when the\npayload is bytes type.\nConfusingly it also handles other types of controls, but the payload\nparsing implementation is only valid for bytes.\n\nFix the code to count the non bytes controls and instead of storing a\npointer to sof_abi_hdr in sof_widget_data (which is only valid for bytes),\nstore the pointer to the data itself and add a new member to save the size\nof the data.\n\nIn case of non bytes controls we store the pointer to the chanv itself,\nwhich is just an array of values at the end.\n\nIn case of bytes control, drop the wrong cdata-\u003edata (wdata[i].pdata) check\nagainst NULL since it is incorrect and invalid in this context.\nThe data is pointing to the end of cdata struct, so it should never be\nnull."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T08:39:39.327Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/896b03bb7c7010042786cfae2115083d4c241dd3"
        },
        {
          "url": "https://git.kernel.org/stable/c/a962890a5a3cce903ff7c7a19fadee63ed9efdc7"
        }
      ],
      "title": "ASoC: SOF: ipc3-topology: Correct get_control_data for non bytes payload",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49518",
    "datePublished": "2025-02-26T02:13:45.396Z",
    "dateReserved": "2025-02-26T02:08:31.587Z",
    "dateUpdated": "2025-05-04T08:39:39.327Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-49518\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-02-26T07:01:27.837\",\"lastModified\":\"2025-02-26T07:01:27.837\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nASoC: SOF: ipc3-topology: Correct get_control_data for non bytes payload\\n\\nIt is possible to craft a topology where sof_get_control_data() would do\\nout of bounds access because it expects that it is only called when the\\npayload is bytes type.\\nConfusingly it also handles other types of controls, but the payload\\nparsing implementation is only valid for bytes.\\n\\nFix the code to count the non bytes controls and instead of storing a\\npointer to sof_abi_hdr in sof_widget_data (which is only valid for bytes),\\nstore the pointer to the data itself and add a new member to save the size\\nof the data.\\n\\nIn case of non bytes controls we store the pointer to the chanv itself,\\nwhich is just an array of values at the end.\\n\\nIn case of bytes control, drop the wrong cdata-\u003edata (wdata[i].pdata) check\\nagainst NULL since it is incorrect and invalid in this context.\\nThe data is pointing to the end of cdata struct, so it should never be\\nnull.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ASoC: SOF: ipc3-topology: get_control_data correcto para payload que no sea de bytes Es posible crear una topolog\u00eda donde sof_get_control_data() har\u00eda acceso fuera de los l\u00edmites porque espera que solo se llame cuando el payload sea de tipo bytes. Confusamente tambi\u00e9n maneja otros tipos de controles, pero la implementaci\u00f3n del an\u00e1lisis del payload solo es v\u00e1lida para bytes. Corrija el c\u00f3digo para contar los controles que no sean de bytes y en lugar de almacenar un puntero a sof_abi_hdr en sof_widget_data (que solo es v\u00e1lido para bytes), almacene el puntero a los datos en s\u00ed y agregue un nuevo miembro para guardar el tama\u00f1o de los datos. En el caso de controles que no sean de bytes, almacenamos el puntero al chanv en s\u00ed, que es solo una matriz de valores al final. En el caso del control de bytes, elimine la comprobaci\u00f3n incorrecta cdata-\u0026gt;data (wdata[i].pdata) contra NULL ya que es incorrecta e inv\u00e1lida en este contexto. Los datos apuntan al final de la estructura cdata, por lo que nunca deben ser nulos.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/896b03bb7c7010042786cfae2115083d4c241dd3\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a962890a5a3cce903ff7c7a19fadee63ed9efdc7\",\"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.


Loading…

Loading…