scsi: bfa: Ensure the copied buf is NUL terminated
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9f30b674759b9a2da25aefe25d885161d8a911cb · < 204714e68015d6946279719fd464ecaf57240f35| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: bfa: Ensure the copied buf is NUL terminated
Currently, we allocate a nbytes-sized kernel buffer and copy nbytes from userspace to that buffer. Later, we use sscanf on this buffer but we don't ensure that the string is terminated inside the buffer, this can lead to OOB read when using sscanf. Fix this issue by using memdup_user_nul instead of memdup_user.
From the CVE record · Linux
The Linux kernel’s bfa SCSI driver copies data from userspace into a buffer without ensuring it is NUL-terminated. When the driver later parses that buffer with sscanf, the missing terminator can cause an out-of-bounds read. The issue involves userspace input; the provided information does not specify authentication requirements.
Engineers running Linux kernels with the bfa SCSI driver should check their versions against the vendor advisory; affected versions are not specified here.