scsi: lpfc: Prevent lpfc_debugfs_lockstat_write() buffer overflow
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6a828b0f6192b4930894925d1c1d0dc1f1d99e6e · < c6087b82a9146826564a55c5ca0164cac40348f5| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Prevent lpfc_debugfs_lockstat_write() buffer overflow
A static code analysis tool flagged the possibility of buffer overflow when using copy_from_user() for a debugfs entry.
Currently, it is possible that copy_from_user() copies more bytes than what would fit in the mybuf char array. Add a min() restriction check between sizeof(mybuf) - 1 and nbytes passed from the userspace buffer to protect against buffer overflow.
From the CVE record · Linux
The Linux kernel's lpfc_debugfs_lockstat_write() can copy more data from userspace than fits in its buffer. A local user who can write to the affected debugfs entry could trigger a buffer overflow. The input does not specify whether authentication or additional privileges are required.
Teams running Linux kernels with the lpfc driver should check whether their kernel includes the fix; affected versions are not specified.