drivers/rapidio/rio_cm.c: prevent possible heap overwrite
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b6e8d4aa1110306378af0f3472a6b85a1f039a16 · < 1cce6ac47f4a2ac1766b8a188dc8c8f6d8df2a53| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drivers/rapidio/rio_cm.c: prevent possible heap overwrite
In
riocm_cdev_ioctl(RIO_CM_CHAN_SEND) -> cm_chan_msg_send() -> riocm_ch_send()
cm_chan_msg_send() checks that userspace didn't send too much data but riocm_ch_send() failed to check that userspace sent sufficient data. The result is that riocm_ch_send() can write to fields in the rio_ch_chan_hdr which were outside the bounds of the space which cm_chan_msg_send() allocated.
Address this by teaching riocm_ch_send() to check that the entire rio_ch_chan_hdr was copied in from userspace.
From the CVE record · Linux
The Linux kernel’s RapidIO channel messaging code can write beyond an allocated buffer if userspace supplies too little data for a channel header. A local user who can send a RIO_CM_CHAN_SEND ioctl may trigger the overwrite; the input does not specify whether authentication or additional privileges are required.
Engineers running Linux kernels with the affected RapidIO driver should check their kernel vendor’s advisory for affected versions.