scsi: qedf: Ensure the copied buf is NUL terminated
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 61d8658b4a435eac729966cc94cdda077a8df5cd · < 563e609275927c0b75fbfd0d90441543aa7b5e0d| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: qedf: Ensure the copied buf is NUL terminated
Currently, we allocate a count-sized kernel buffer and copy count from userspace to that buffer. Later, we use kstrtouint on this buffer but we don't ensure that the string is terminated inside the buffer, this can lead to OOB read when using kstrtouint. Fix this issue by using memdup_user_nul instead of memdup_user.
From the CVE record · Linux
The qedf SCSI driver copies a user-supplied buffer without ensuring it is NUL-terminated before parsing it with kstrtouint. This can cause an out-of-bounds read when the buffer is not terminated. The issue involves a local userspace input; authentication requirements are not specified.
Engineers running the Linux kernel with the qedf SCSI driver should check their kernel versions against the vendor advisory; affected versions are not specified.