netdevsim: Add trailing zero to terminate the string in nsim_nexthop_bucket_activity_write()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
netdevsim: Add trailing zero to terminate the string in nsim_nexthop_bucket_activity_write()
This was found by a static analyzer. We should not forget the trailing zero after copy_from_user() if we will further do some string operations, sscanf() in this case. Adding a trailing zero will ensure that the function performs properly.
From the CVE record · Linux
The Linux kernel’s netdevsim write function does not add a terminating zero after copying user input, which can affect a subsequent sscanf() operation. This is classified as an out-of-bounds read; the input does not establish specific exploit conditions or authentication requirements.
Engineers running Linux kernels with netdevsim should check whether their kernel includes the fix; affected versions were not provided.