{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-50182",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-06-18T10:57:27.427Z",
        "datePublished": "2025-06-18T11:03:30.943Z",
        "dateUpdated": "2026-08-05T08:57:39.631Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:57:39.631Z"
            },
            "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't change it to 1920x1072."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "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"
                    },
                    "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 → 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."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c"
                    ],
                    "versions": [
                        {
                            "version": "2db16c6ed72ce644d5639b3ed15e5817442db4ba",
                            "lessThan": "9ae2d729de6350c53a06c57782751d84eb2c08d9",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2db16c6ed72ce644d5639b3ed15e5817442db4ba",
                            "lessThan": "73d1836ed7911953182b787745cb8c5857a2661c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2db16c6ed72ce644d5639b3ed15e5817442db4ba",
                            "lessThan": "447795ffb17cd60bb544e0abfc9399e180a14a2f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "2db16c6ed72ce644d5639b3ed15e5817442db4ba",
                            "lessThan": "9e7aa76cdb02923ee23a0ddd48f38bdc3512f92b",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c"
                    ],
                    "versions": [
                        {
                            "version": "5.13",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.13",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.61",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.18.18",
                            "lessThanOrEqual": "5.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.19.2",
                            "lessThanOrEqual": "5.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.13",
                                    "versionEndExcluding": "5.15.61"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.13",
                                    "versionEndExcluding": "5.18.18"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.13",
                                    "versionEndExcluding": "5.19.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.13",
                                    "versionEndExcluding": "6.0"
                                }
                            ]
                        }
                    ]
                }
            ],
            "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"
            }
        }
    }
}