CVE-2022-50182 (GCVE-0-2022-50182)

Vulnerability from cvelistv5 – Published: 2025-06-18 11:03 – Updated: 2026-08-05 08:57
VLAI
Title
media: imx-jpeg: Align upwards buffer size
Summary
In the Linux kernel, the following vulnerability has been resolved: media: imx-jpeg: Align upwards buffer size The hardware can support any image size WxH, with arbitrary W (image width) and H (image height) dimensions. Align upwards buffer size for both encoder and decoder. and leave the picture resolution unchanged. For decoder, the risk of memory out of bounds can be avoided. For both encoder and decoder, the driver will lift the limitation of resolution alignment. For example, the decoder can support jpeg whose resolution is 227x149 the encoder can support nv12 1080P, won't change it to 1920x1072.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 2db16c6ed72ce644d5639b3ed15e5817442db4ba , < 9ae2d729de6350c53a06c57782751d84eb2c08d9 (git)
Affected: 2db16c6ed72ce644d5639b3ed15e5817442db4ba , < 73d1836ed7911953182b787745cb8c5857a2661c (git)
Affected: 2db16c6ed72ce644d5639b3ed15e5817442db4ba , < 447795ffb17cd60bb544e0abfc9399e180a14a2f (git)
Affected: 2db16c6ed72ce644d5639b3ed15e5817442db4ba , < 9e7aa76cdb02923ee23a0ddd48f38bdc3512f92b (git)
guessed Create a notification for this product.
Linux Linux Affected: 5.13
Unaffected: 0 , < 5.13 (semver)
Unaffected: 5.15.61 , ≤ 5.15.* (semver)
Unaffected: 5.18.18 , ≤ 5.18.* (semver)
Unaffected: 5.19.2 , ≤ 5.19.* (semver)
Unaffected: 6.0 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "9ae2d729de6350c53a06c57782751d84eb2c08d9",
              "status": "affected",
              "version": "2db16c6ed72ce644d5639b3ed15e5817442db4ba",
              "versionType": "git"
            },
            {
              "lessThan": "73d1836ed7911953182b787745cb8c5857a2661c",
              "status": "affected",
              "version": "2db16c6ed72ce644d5639b3ed15e5817442db4ba",
              "versionType": "git"
            },
            {
              "lessThan": "447795ffb17cd60bb544e0abfc9399e180a14a2f",
              "status": "affected",
              "version": "2db16c6ed72ce644d5639b3ed15e5817442db4ba",
              "versionType": "git"
            },
            {
              "lessThan": "9e7aa76cdb02923ee23a0ddd48f38bdc3512f92b",
              "status": "affected",
              "version": "2db16c6ed72ce644d5639b3ed15e5817442db4ba",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.13"
            },
            {
              "lessThan": "5.13",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.61",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.18.*",
              "status": "unaffected",
              "version": "5.18.18",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.61",
                  "versionStartIncluding": "5.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18.18",
                  "versionStartIncluding": "5.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.2",
                  "versionStartIncluding": "5.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0",
                  "versionStartIncluding": "5.13",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: imx-jpeg: Align upwards buffer size\n\nThe hardware can support any image size WxH,\nwith arbitrary W (image width) and H (image height) dimensions.\n\nAlign upwards buffer size for both encoder and decoder.\nand leave the picture resolution unchanged.\n\nFor decoder, the risk of memory out of bounds can be avoided.\nFor both encoder and decoder, the driver will lift the limitation of\nresolution alignment.\n\nFor example, the decoder can support jpeg whose resolution is 227x149\nthe encoder can support nv12 1080P, won\u0027t change it to 1920x1072."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable code is reached via V4L2 ioctls on the imx-jpeg /dev/video* mem2mem device node; an attacker must have local access to open the decoder and queue buffers.\nAC:L - An attacker can reliably trigger the overflow by submitting a JPEG whose dimensions pass the multiple-of-8 check but require stronger format alignment (e.g. NV12 1920x1080 \u2192 h_adjusted 1088), with no race or unpredictable condition.\nPR:L - Exploitation needs only the ability to open the V4L2 video device (typically root:video 0660); no root/capabilities are required, matching other imx-jpeg ioctl-reachable CVEs scored PR:L.\nUI:N - The attacker interacts with the decoder device themselves by queuing a crafted JPEG; no separate victim action is required.\nS:U - Impact is confined to the local kernel/CMA memory of the host; this is standard kernel memory corruption without crossing a VM, IOMMU, or other security authority boundary.\nC:H - DMA writes attacker-influenced decoded pixel data past the capture buffer into adjacent CMA/kernel memory, which is memory corruption that can be leveraged for information disclosure primitives.\nI:H - This is a hardware DMA out-of-bounds write of controllable decoded image data past an undersized vb2_dma_contig buffer, enabling adjacent-memory corruption and potential control-flow hijacking.\nA:H - Writing past the allocated DMA buffer into adjacent memory can cause kernel oops/panic or otherwise disrupt system availability."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:57:39.631Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/9ae2d729de6350c53a06c57782751d84eb2c08d9"
        },
        {
          "url": "https://git.kernel.org/stable/c/73d1836ed7911953182b787745cb8c5857a2661c"
        },
        {
          "url": "https://git.kernel.org/stable/c/447795ffb17cd60bb544e0abfc9399e180a14a2f"
        },
        {
          "url": "https://git.kernel.org/stable/c/9e7aa76cdb02923ee23a0ddd48f38bdc3512f92b"
        }
      ],
      "title": "media: imx-jpeg: Align upwards buffer size",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50182",
    "datePublished": "2025-06-18T11:03:30.943Z",
    "dateReserved": "2025-06-18T10:57:27.427Z",
    "dateUpdated": "2026-08-05T08:57:39.631Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-50182",
      "date": "2026-08-18",
      "epss": "0.00221",
      "percentile": "0.12927"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50182\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-06-18T11:15:48.700\",\"lastModified\":\"2026-08-04T10:18:06.853\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nmedia: imx-jpeg: Align upwards buffer size\\n\\nThe hardware can support any image size WxH,\\nwith arbitrary W (image width) and H (image height) dimensions.\\n\\nAlign upwards buffer size for both encoder and decoder.\\nand leave the picture resolution unchanged.\\n\\nFor decoder, the risk of memory out of bounds can be avoided.\\nFor both encoder and decoder, the driver will lift the limitation of\\nresolution alignment.\\n\\nFor example, the decoder can support jpeg whose resolution is 227x149\\nthe encoder can support nv12 1080P, won\u0027t change it to 1920x1072.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: media: imx-jpeg: Alinear hacia arriba el tama\u00f1o del b\u00fafer. El hardware puede admitir cualquier tama\u00f1o de imagen (ancho x alto), con dimensiones arbitrarias de ancho y alto. Alinear hacia arriba el tama\u00f1o del b\u00fafer tanto para el codificador como para el decodificador y dejar la resoluci\u00f3n de la imagen sin cambios. Para el decodificador, se puede evitar el riesgo de memoria fuera de los l\u00edmites. Tanto para el codificador como para el decodificador, el controlador eliminar\u00e1 la limitaci\u00f3n de la alineaci\u00f3n de la resoluci\u00f3n. Por ejemplo, el decodificador puede admitir jpeg cuya resoluci\u00f3n es de 227x149, el codificador puede admitir nv12 1080P, no lo cambiar\u00e1 a 1920x1072.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"2db16c6ed72ce644d5639b3ed15e5817442db4ba\",\"lessThan\":\"9ae2d729de6350c53a06c57782751d84eb2c08d9\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"2db16c6ed72ce644d5639b3ed15e5817442db4ba\",\"lessThan\":\"73d1836ed7911953182b787745cb8c5857a2661c\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"2db16c6ed72ce644d5639b3ed15e5817442db4ba\",\"lessThan\":\"447795ffb17cd60bb544e0abfc9399e180a14a2f\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"2db16c6ed72ce644d5639b3ed15e5817442db4ba\",\"lessThan\":\"9e7aa76cdb02923ee23a0ddd48f38bdc3512f92b\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5.13\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"5.13\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.15.61\",\"lessThanOrEqual\":\"5.15.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.18.18\",\"lessThanOrEqual\":\"5.18.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.19.2\",\"lessThanOrEqual\":\"5.19.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.0\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9},{\"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:H/I:N/A:H\",\"baseScore\":7.1,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.2}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-125\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.13\",\"versionEndExcluding\":\"5.15.61\",\"matchCriteriaId\":\"508EFB53-3AD2-405D-9368-107BD8BEA339\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"5.18.18\",\"matchCriteriaId\":\"5B42E453-8837-49D0-A5EF-03F818A6DC11\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.19\",\"versionEndExcluding\":\"5.19.2\",\"matchCriteriaId\":\"A1A2A5A5-4598-4D7E-BA07-4660398D6C8F\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/447795ffb17cd60bb544e0abfc9399e180a14a2f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/73d1836ed7911953182b787745cb8c5857a2661c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9ae2d729de6350c53a06c57782751d84eb2c08d9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9e7aa76cdb02923ee23a0ddd48f38bdc3512f92b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:36:18+00:00",
      "cve": "CVE-2022-50182",
      "id": "CVE-2022-50182",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: media: imx-jpeg: Align upwards buffer size",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-50182.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-08-04T00:00:42Z",
      "cve": "CVE-2022-50182",
      "id": "CVE-2022-50182",
      "initial_release_date": "2025-06-19T03:39:41Z",
      "product_status:known_affected": "55",
      "product_status:known_not_affected": "346",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2022-50182",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2022-50182.json",
      "version": "9"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…