cve-2024-50196
Vulnerability from cvelistv5
Published
2024-11-08 05:54
Modified
2024-12-19 09:35
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: pinctrl: ocelot: fix system hang on level based interrupts The current implementation only calls chained_irq_enter() and chained_irq_exit() if it detects pending interrupts. ``` for (i = 0; i < info->stride; i++) { uregmap_read(info->map, id_reg + 4 * i, &reg); if (!reg) continue; chained_irq_enter(parent_chip, desc); ``` However, in case of GPIO pin configured in level mode and the parent controller configured in edge mode, GPIO interrupt might be lowered by the hardware. In the result, if the interrupt is short enough, the parent interrupt is still pending while the GPIO interrupt is cleared; chained_irq_enter() never gets called and the system hangs trying to service the parent interrupt. Moving chained_irq_enter() and chained_irq_exit() outside the for loop ensures that they are called even when GPIO interrupt is lowered by the hardware. The similar code with chained_irq_enter() / chained_irq_exit() functions wrapping interrupt checking loop may be found in many other drivers: ``` grep -r -A 10 chained_irq_enter drivers/pinctrl ```
Impacted products
Vendor Product Version
Linux Linux Version: ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f
Version: ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f
Version: ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f
Version: ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f
Version: ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f
Create a notification for this product.
   Linux Linux Version: 4.16
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/pinctrl/pinctrl-ocelot.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "655f5d4662b958122b260be05aa6dfdf8768efe6",
              "status": "affected",
              "version": "ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f",
              "versionType": "git"
            },
            {
              "lessThan": "4a81800ef05bea5a9896f199677f7b7f5020776a",
              "status": "affected",
              "version": "ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f",
              "versionType": "git"
            },
            {
              "lessThan": "20728e86289ab463b99b7ab4425515bd26aba417",
              "status": "affected",
              "version": "ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f",
              "versionType": "git"
            },
            {
              "lessThan": "dcbe9954634807ec54e22bde278b5b269f921381",
              "status": "affected",
              "version": "ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f",
              "versionType": "git"
            },
            {
              "lessThan": "93b8ddc54507a227087c60a0013ed833b6ae7d3c",
              "status": "affected",
              "version": "ce8dc0943357a5d10b05dcf0556b537c1d7b8b1f",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/pinctrl/pinctrl-ocelot.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.16"
            },
            {
              "lessThan": "4.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.169",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.114",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.58",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.11.*",
              "status": "unaffected",
              "version": "6.11.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.12",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\npinctrl: ocelot: fix system hang on level based interrupts\n\nThe current implementation only calls chained_irq_enter() and\nchained_irq_exit() if it detects pending interrupts.\n\n```\nfor (i = 0; i \u003c info-\u003estride; i++) {\n\turegmap_read(info-\u003emap, id_reg + 4 * i, \u0026reg);\n\tif (!reg)\n\t\tcontinue;\n\n\tchained_irq_enter(parent_chip, desc);\n```\n\nHowever, in case of GPIO pin configured in level mode and the parent\ncontroller configured in edge mode, GPIO interrupt might be lowered by the\nhardware. In the result, if the interrupt is short enough, the parent\ninterrupt is still pending while the GPIO interrupt is cleared;\nchained_irq_enter() never gets called and the system hangs trying to\nservice the parent interrupt.\n\nMoving chained_irq_enter() and chained_irq_exit() outside the for loop\nensures that they are called even when GPIO interrupt is lowered by the\nhardware.\n\nThe similar code with chained_irq_enter() / chained_irq_exit() functions\nwrapping interrupt checking loop may be found in many other drivers:\n```\ngrep -r -A 10 chained_irq_enter drivers/pinctrl\n```"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-19T09:35:14.566Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/655f5d4662b958122b260be05aa6dfdf8768efe6"
        },
        {
          "url": "https://git.kernel.org/stable/c/4a81800ef05bea5a9896f199677f7b7f5020776a"
        },
        {
          "url": "https://git.kernel.org/stable/c/20728e86289ab463b99b7ab4425515bd26aba417"
        },
        {
          "url": "https://git.kernel.org/stable/c/dcbe9954634807ec54e22bde278b5b269f921381"
        },
        {
          "url": "https://git.kernel.org/stable/c/93b8ddc54507a227087c60a0013ed833b6ae7d3c"
        }
      ],
      "title": "pinctrl: ocelot: fix system hang on level based interrupts",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-50196",
    "datePublished": "2024-11-08T05:54:10.949Z",
    "dateReserved": "2024-10-21T19:36:19.968Z",
    "dateUpdated": "2024-12-19T09:35:14.566Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-50196\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-11-08T06:15:16.347\",\"lastModified\":\"2024-11-29T20:28:53.843\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\npinctrl: ocelot: fix system hang on level based interrupts\\n\\nThe current implementation only calls chained_irq_enter() and\\nchained_irq_exit() if it detects pending interrupts.\\n\\n```\\nfor (i = 0; i \u003c info-\u003estride; i++) {\\n\\turegmap_read(info-\u003emap, id_reg + 4 * i, \u0026reg);\\n\\tif (!reg)\\n\\t\\tcontinue;\\n\\n\\tchained_irq_enter(parent_chip, desc);\\n```\\n\\nHowever, in case of GPIO pin configured in level mode and the parent\\ncontroller configured in edge mode, GPIO interrupt might be lowered by the\\nhardware. In the result, if the interrupt is short enough, the parent\\ninterrupt is still pending while the GPIO interrupt is cleared;\\nchained_irq_enter() never gets called and the system hangs trying to\\nservice the parent interrupt.\\n\\nMoving chained_irq_enter() and chained_irq_exit() outside the for loop\\nensures that they are called even when GPIO interrupt is lowered by the\\nhardware.\\n\\nThe similar code with chained_irq_enter() / chained_irq_exit() functions\\nwrapping interrupt checking loop may be found in many other drivers:\\n```\\ngrep -r -A 10 chained_irq_enter drivers/pinctrl\\n```\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: pinctrl: ocelot: arregla el bloqueo del sistema en interrupciones basadas en niveles La implementaci\u00f3n actual solo llama a chained_irq_enter() y chained_irq_exit() si detecta interrupciones pendientes. ``` for (i = 0; i \u0026lt; info-\u0026gt;stride; i++) { uregmap_read(info-\u0026gt;map, id_reg + 4 * i, \u00ae); if (!reg) continue; chained_irq_enter(parent_chip, desc); ``` Sin embargo, en el caso de que el pin GPIO est\u00e9 configurado en modo de nivel y el controlador principal est\u00e9 configurado en modo de borde, el hardware puede reducir la interrupci\u00f3n GPIO. Como resultado, si la interrupci\u00f3n es lo suficientemente corta, la interrupci\u00f3n principal sigue pendiente mientras se borra la interrupci\u00f3n GPIO; chained_irq_enter() nunca se llama y el sistema se cuelga al intentar dar servicio a la interrupci\u00f3n principal. Mover chained_irq_enter() y chained_irq_exit() fuera del bucle for garantiza que se llamen incluso cuando el hardware reduce la interrupci\u00f3n GPIO. El c\u00f3digo similar con las funciones chained_irq_enter() / chained_irq_exit() que envuelven el bucle de verificaci\u00f3n de interrupciones se puede encontrar en muchos otros controladores: ``` grep -r -A 10 chained_irq_enter drivers/pinctrl ```\"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-754\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionEndExcluding\":\"5.15.169\",\"matchCriteriaId\":\"6BDAF23B-6DD3-4FF3-9077-AE6E61F87D65\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"6.1.114\",\"matchCriteriaId\":\"10FD2B3E-C7D9-4A9C-BD64-41877EDF88EB\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.2\",\"versionEndExcluding\":\"6.6.58\",\"matchCriteriaId\":\"6B9489BC-825E-4EEE-8D93-F93C801988C8\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.7\",\"versionEndExcluding\":\"6.11.5\",\"matchCriteriaId\":\"6E62D61A-F704-44DB-A311-17B7534DA7BC\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"7F361E1D-580F-4A2D-A509-7615F73167A1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"925478D0-3E3D-4E6F-ACD5-09F28D5DF82C\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.12:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"3C95E234-D335-4B6C-96BF-E2CEBD8654ED\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/20728e86289ab463b99b7ab4425515bd26aba417\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/4a81800ef05bea5a9896f199677f7b7f5020776a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/655f5d4662b958122b260be05aa6dfdf8768efe6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/93b8ddc54507a227087c60a0013ed833b6ae7d3c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/dcbe9954634807ec54e22bde278b5b269f921381\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}"
  }
}


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.