CVE-2022-50301 iommu/omap: Fix buffer overflow in debugfs
A buffer overflow in the Linux kernel's OMAP IOMMU debugfs interface allows attackers with debugfs access to cause memory corruption or system crashes.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-50301?
CVE-2022-50301 is a high-severity memory corruption vulnerability in Linux kernel, published on 15 Sep 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
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.
Weakness: CWE-787
Which versions are affected by CVE-2022-50301?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-50301?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2022-50301 being exploited?
There is no known exploitation of CVE-2022-50301 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-50301, GHSA-q6qc-4j4f-5vqp, UBUNTU-CVE-2022-50301.