tty: hvc_iucv: fix off-by-one in number of supported devices
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 44a01d5ba8a4d543694461cd3e178cfa6b3f221b · < 3104a3f40feb107f77d7116ad9bf6c210ab7babf| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tty: hvc_iucv: fix off-by-one in number of supported devices
MAX_HVC_IUCV_LINES == HVC_ALLOC_TTY_ADAPTERS == 8. This is the number of entries in: static struct hvc_iucv_private *hvc_iucv_table[MAX_HVC_IUCV_LINES];
Sometimes hvc_iucv_table[] is limited by: (a) if (num > hvc_iucv_devices) // for error detection or (b) for (i = 0; i < hvc_iucv_devices; i++) // in 2 places (so these 2 don't agree; second one appears to be correct to me.)
hvc_iucv_devices can be 0..8. This is a counter. (c) if (hvc_iucv_devices > MAX_HVC_IUCV_LINES)
If hvc_iucv_devices == 8, (a) allows the code to access hvc_iucv_table[8]. Oops.
From the CVE record · Linux
The Linux kernel’s tty hvc_iucv code has an off-by-one error: when the supported-device count is 8, a bounds check can allow access to an entry past the end of an eight-entry table. The input does not specify how an attacker could trigger this access or whether authentication or user interaction is required.
Engineers running Linux kernels with the hvc_iucv component should check their deployments; affected versions are not specified.