{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-50301",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-09-15T14:18:36.812Z",
        "datePublished": "2025-09-15T14:45:57.019Z",
        "dateUpdated": "2026-05-11T19:16:40.085Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-05-11T19:16:40.085Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\niommu/omap: Fix buffer overflow in debugfs\n\nThere are two issues here:\n\n1) The \"len\" variable needs to be checked before the very first write.\n   Otherwise if omap2_iommu_dump_ctx() with \"bytes\" less than 32 it is a\n   buffer overflow.\n2) The snprintf() function returns the number of bytes that *would* have\n   been copied if there were enough space.  But we want to know the\n   number of bytes which were *actually* copied so use scnprintf()\n   instead."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/iommu/omap-iommu-debug.c"
                    ],
                    "versions": [
                        {
                            "version": "bd4396f09a4a9e77423e92ec9448217ab46f6edf",
                            "lessThan": "706e359cf046c142db290244c3f4938b20fbe805",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bd4396f09a4a9e77423e92ec9448217ab46f6edf",
                            "lessThan": "ec53b99b6b9da8b501f001595a6260c03b42d5b7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bd4396f09a4a9e77423e92ec9448217ab46f6edf",
                            "lessThan": "648472df221f2bbffb433b964bcb87baccc586d8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bd4396f09a4a9e77423e92ec9448217ab46f6edf",
                            "lessThan": "4010a1afaae1c0fb9c2cac5de703bed29b1f1782",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bd4396f09a4a9e77423e92ec9448217ab46f6edf",
                            "lessThan": "2fee0dbfaeaaa4bda04279ce772c4572b1429d04",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bd4396f09a4a9e77423e92ec9448217ab46f6edf",
                            "lessThan": "0c7043a5b5c3b35f5dc8875757f71e7f491d64d4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bd4396f09a4a9e77423e92ec9448217ab46f6edf",
                            "lessThan": "bd0438f534b2e31b12f0b39b355c5dc2bbdaf854",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bd4396f09a4a9e77423e92ec9448217ab46f6edf",
                            "lessThan": "9814cc350e0765ce69244bf55ae4c8b29facd27e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bd4396f09a4a9e77423e92ec9448217ab46f6edf",
                            "lessThan": "184233a5202786b20220acd2d04ddf909ef18f29",
                            "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/iommu/omap-iommu-debug.c"
                    ],
                    "versions": [
                        {
                            "version": "3.19",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.19",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.9.331",
                            "lessThanOrEqual": "4.9.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.14.296",
                            "lessThanOrEqual": "4.14.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "4.19.262",
                            "lessThanOrEqual": "4.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.4.220",
                            "lessThanOrEqual": "5.4.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.150",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.75",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.19.17",
                            "lessThanOrEqual": "5.19.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.0.3",
                            "lessThanOrEqual": "6.0.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1",
                            "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": "3.19",
                                    "versionEndExcluding": "4.9.331"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.19",
                                    "versionEndExcluding": "4.14.296"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.19",
                                    "versionEndExcluding": "4.19.262"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.19",
                                    "versionEndExcluding": "5.4.220"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.19",
                                    "versionEndExcluding": "5.10.150"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.19",
                                    "versionEndExcluding": "5.15.75"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.19",
                                    "versionEndExcluding": "5.19.17"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.19",
                                    "versionEndExcluding": "6.0.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.19",
                                    "versionEndExcluding": "6.1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/706e359cf046c142db290244c3f4938b20fbe805"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ec53b99b6b9da8b501f001595a6260c03b42d5b7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/648472df221f2bbffb433b964bcb87baccc586d8"
                },
                {
                    "url": "https://git.kernel.org/stable/c/4010a1afaae1c0fb9c2cac5de703bed29b1f1782"
                },
                {
                    "url": "https://git.kernel.org/stable/c/2fee0dbfaeaaa4bda04279ce772c4572b1429d04"
                },
                {
                    "url": "https://git.kernel.org/stable/c/0c7043a5b5c3b35f5dc8875757f71e7f491d64d4"
                },
                {
                    "url": "https://git.kernel.org/stable/c/bd0438f534b2e31b12f0b39b355c5dc2bbdaf854"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9814cc350e0765ce69244bf55ae4c8b29facd27e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/184233a5202786b20220acd2d04ddf909ef18f29"
                }
            ],
            "title": "iommu/omap: Fix buffer overflow in debugfs",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}