CVE-2022-50322 (GCVE-0-2022-50322)
Vulnerability from cvelistv5
Published
2025-09-15 14:48
Modified
2025-09-16 08:02
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. msc313_rtc_probe() was passing clk_disable_unprepare() directly, which did not have matching prototypes for devm_add_action_or_reset()'s callback argument. Refactor to use devm_clk_get_enabled() instead. This was found as a result of Clang's new -Wcast-function-type-strict flag, which is more sensitive than the simpler -Wcast-function-type, which only checks for type width mismatches.
Impacted products
Vendor Product Version
Linux Linux Version: be7d9c9161b9c76edeff15e79edc2f256568fe05
Version: be7d9c9161b9c76edeff15e79edc2f256568fe05
Version: be7d9c9161b9c76edeff15e79edc2f256568fe05
Create a notification for this product.
   Linux Linux Version: 5.16
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/rtc/rtc-msc313.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "5affaaf3334c9274131dae889ed79ea0553d61b4",
              "status": "affected",
              "version": "be7d9c9161b9c76edeff15e79edc2f256568fe05",
              "versionType": "git"
            },
            {
              "lessThan": "ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0",
              "status": "affected",
              "version": "be7d9c9161b9c76edeff15e79edc2f256568fe05",
              "versionType": "git"
            },
            {
              "lessThan": "21b8a1dd56a163825e5749b303858fb902ebf198",
              "status": "affected",
              "version": "be7d9c9161b9c76edeff15e79edc2f256568fe05",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/rtc/rtc-msc313.c"
          ],
          "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": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.17",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.3",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.17",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.3",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nrtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()\n\nWith clang\u0027s kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),\nindirect call targets are validated against the expected function\npointer prototype to make sure the call target is valid to help mitigate\nROP attacks. If they are not identical, there is a failure at run time,\nwhich manifests as either a kernel panic or thread getting killed.\n\nmsc313_rtc_probe() was passing clk_disable_unprepare() directly, which\ndid not have matching prototypes for devm_add_action_or_reset()\u0027s\ncallback argument. Refactor to use devm_clk_get_enabled() instead.\n\nThis was found as a result of Clang\u0027s new -Wcast-function-type-strict\nflag, which is more sensitive than the simpler -Wcast-function-type,\nwhich only checks for type width mismatches."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-09-16T08:02:08.115Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/5affaaf3334c9274131dae889ed79ea0553d61b4"
        },
        {
          "url": "https://git.kernel.org/stable/c/ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0"
        },
        {
          "url": "https://git.kernel.org/stable/c/21b8a1dd56a163825e5749b303858fb902ebf198"
        }
      ],
      "title": "rtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50322",
    "datePublished": "2025-09-15T14:48:55.905Z",
    "dateReserved": "2025-09-15T14:18:36.814Z",
    "dateUpdated": "2025-09-16T08:02:08.115Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50322\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-09-15T15:15:44.240\",\"lastModified\":\"2025-09-15T15:22:27.090\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nrtc: msc313: Fix function prototype mismatch in msc313_rtc_probe()\\n\\nWith clang\u0027s kernel control flow integrity (kCFI, CONFIG_CFI_CLANG),\\nindirect call targets are validated against the expected function\\npointer prototype to make sure the call target is valid to help mitigate\\nROP attacks. If they are not identical, there is a failure at run time,\\nwhich manifests as either a kernel panic or thread getting killed.\\n\\nmsc313_rtc_probe() was passing clk_disable_unprepare() directly, which\\ndid not have matching prototypes for devm_add_action_or_reset()\u0027s\\ncallback argument. Refactor to use devm_clk_get_enabled() instead.\\n\\nThis was found as a result of Clang\u0027s new -Wcast-function-type-strict\\nflag, which is more sensitive than the simpler -Wcast-function-type,\\nwhich only checks for type width mismatches.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/21b8a1dd56a163825e5749b303858fb902ebf198\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5affaaf3334c9274131dae889ed79ea0553d61b4\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ba50fee6b41bcbafaeed3c51f90d37d1480ff9a0\",\"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…