iommu/omap: Fix buffer overflow in debugfs
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ bd4396f09a4a9e77423e92ec9448217ab46f6edf · < 0c7043a5b5c3b35f5dc8875757f71e7f491d64d4| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s OMAP IOMMU debugfs code can overflow a buffer if omap2_iommu_dump_ctx() is called with fewer than 32 bytes. The input does not specify how an attacker could trigger this condition, whether authentication or user interaction is needed, or whether access is local or over a network.
Engineers running Linux kernels with OMAP IOMMU debugfs should check their installations; affected versions are not specified.