hdlcdrv: Fix divide by zero in hdlcdrv_ioctl
syszkaller fuzzer triggered a divide by zero, when set calibration through ioctl(). To fix it, test 'bitrate' if it is negative or 0, just return -EINVAL. Reported-by: NAndrey Konovalov <andreyknvl@google.com> Signed-off-by: NFiro Yang <firogm@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录