iommu/omap: Fix buffer overflow in debugfs
In the Linux kernel, the following vulnerability has been resolved: iommu/omap: Fix buffer overflow in debugfs There are two issues here: 1) The "len" variable needs to be checked before the very first write. Otherwise if omap2_iommu_dump_ctx() with "bytes" less than 32 it is a buffer overflow. 2) The snprintf() function returns the number of bytes that *would* have been copied if there were enough space. But we want to know the number of bytes which were *actually* copied so use scnprintf() instead.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 4.14.296, 4.19.262, 4.9.331, 5.10.150, 5.15.75, 5.19.17, 5.4.220, 6.0.3
- CVEs
- CVE-2022-50301
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 8 Nov 2026, 00:38 UTC · Revision 1
Source evidence
iommu/omap: Fix buffer overflow in debugfs
core-osv · Original sourcePublished 15 Sept 2025, 14:45 UTC
In the Linux kernel, the following vulnerability has been resolved: iommu/omap: Fix buffer overflow in debugfs There are two issues here: 1) The "len" variable needs to be checked before the very first write. Otherwise if omap2_iommu_dump_ctx() with "bytes" less than 32 it is a buffer overflow. 2) The snprintf() function returns the number of bytes that *would* have been copied if there were enough space. But we want to know the number of bytes which were *actually* copied so use scnprintf() instead.
osv:CVE-2022-50301
Kernel
Fixed versions: 4.9.331, 4.14.296, 4.19.262, 5.4.220, 5.10.150, 5.15.75, 5.19.17, 6.0.3
Complete source record
{
"id": "2ad1eaf04692b2596919d1c30793b275d955049bdc9bad930f0718d1f685e838",
"url": "https://osv.dev/vulnerability/CVE-2022-50301",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "iommu/omap: Fix buffer overflow in debugfs",
"summary": "In the Linux kernel, the following vulnerability has been resolved: iommu/omap: Fix buffer overflow in debugfs There are two issues here: 1) The \"len\" variable needs to be checked before the very first write. Otherwise if omap2_iommu_dump_ctx() with \"bytes\" less than 32 it is a buffer overflow. 2) The snprintf() function returns the number of bytes that *would* have been copied if there were enough space. But we want to know the number of bytes which were *actually* copied so use scnprintf() instead.",
"evidence": "osv:CVE-2022-50301",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.9.331",
"evidence": "/affected/1/ranges"
},
{
"value": "4.14.296",
"evidence": "/affected/1/ranges"
},
{
"value": "4.19.262",
"evidence": "/affected/1/ranges"
},
{
"value": "5.4.220",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.150",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.75",
"evidence": "/affected/1/ranges"
},
{
"value": "5.19.17",
"evidence": "/affected/1/ranges"
},
{
"value": "6.0.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2022-50301",
"aliases": [
"CVE-2022-50301"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "bd4396f09a4a9e77423e92ec9448217ab46f6edf"
},
{
"fixed": "706e359cf046c142db290244c3f4938b20fbe805"
},
{
"fixed": "ec53b99b6b9da8b501f001595a6260c03b42d5b7"
},
{
"fixed": "648472df221f2bbffb433b964bcb87baccc586d8"
},
{
"fixed": "4010a1afaae1c0fb9c2cac5de703bed29b1f1782"
},
{
"fixed": "2fee0dbfaeaaa4bda04279ce772c4572b1429d04"
},
{
"fixed": "0c7043a5b5c3b35f5dc8875757f71e7f491d64d4"
},
{
"fixed": "bd0438f534b2e31b12f0b39b355c5dc2bbdaf854"
},
{
"fixed": "9814cc350e0765ce69244bf55ae4c8b29facd27e"
},
{
"fixed": "184233a5202786b20220acd2d04ddf909ef18f29"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50301.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "3.19.0"
},
{
"fixed": "4.9.331"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.10.0"
},
{
"fixed": "4.14.296"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.15.0"
},
{
"fixed": "4.19.262"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.20.0"
},
{
"fixed": "5.4.220"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.150"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.75"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "5.19.17"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.20.0"
},
{
"fixed": "6.0.3"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50301.json"
}
}
],
"modified": "2026-10-28T02:30:52.621562073Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/0c7043a5b5c3b35f5dc8875757f71e7f491d64d4",
"https://git.kernel.org/stable/c/184233a5202786b20220acd2d04ddf909ef18f29",
"https://git.kernel.org/stable/c/2fee0dbfaeaaa4bda04279ce772c4572b1429d04",
"https://git.kernel.org/stable/c/4010a1afaae1c0fb9c2cac5de703bed29b1f1782",
"https://git.kernel.org/stable/c/648472df221f2bbffb433b964bcb87baccc586d8",
"https://git.kernel.org/stable/c/706e359cf046c142db290244c3f4938b20fbe805",
"https://git.kernel.org/stable/c/9814cc350e0765ce69244bf55ae4c8b29facd27e",
"https://git.kernel.org/stable/c/bd0438f534b2e31b12f0b39b355c5dc2bbdaf854",
"https://git.kernel.org/stable/c/ec53b99b6b9da8b501f001595a6260c03b42d5b7",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50301.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-50301",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50301.json"
}
},
"related_cves": [
{
"value": "CVE-2022-50301",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 521034,
"published_at": "2025-09-15T14:45:57.019+00:00"
}