bna: ensure the copied buf is NUL terminated
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7afc5dbde09104b023ce04465ba71aaba0fc4346 · < e19478763154674c084defc62ae0d64d79657f91| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bna: 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 bna component can pass a copied userspace buffer to sscanf without ensuring it is NUL-terminated. A local user who supplies such a buffer can trigger an out-of-bounds read; the input does not specify authentication requirements or any additional user interaction.
Engineers running Linux kernels with the bna component should check their exposure; affected versions were not specified.