]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
serial: omap: Prevent DoS using unprivileged ioctl(TIOCSRS485)
authorPeter Hurley <peter@hurleysoftware.com>
Tue, 12 Jan 2016 23:14:46 +0000 (15:14 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 07:04:51 +0000 (23:04 -0800)
commit308bbc9ab838d0ace0298268c7970ba9513e2c65
treed9f36e4b088a95cfffd280cda838ff4a3f5cbcc9
parentd56edd7ed0ed46a8043ee3040ededbd190818ccf
serial: omap: Prevent DoS using unprivileged ioctl(TIOCSRS485)

The omap-serial driver emulates RS485 delays using software timers,
but neglects to clamp the input values from the unprivileged
ioctl(TIOCSRS485). Because the software implementation busy-waits,
malicious userspace could stall the cpu for ~49 days.

Clamp the input values to < 100ms.

Fixes: 4a0ac0f55b18 ("OMAP: add RS485 support")
Cc: <stable@vger.kernel.org> # 3.12+
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/omap-serial.c