* Patch "hdlcdrv: Fix divide by zero in hdlcdrv_ioctl" has been added to the 4.4-stable tree
@ 2018-04-10 9:04 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-04-10 9:04 UTC (permalink / raw)
To: firogm, alexander.levin, andreyknvl, davem, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
hdlcdrv: Fix divide by zero in hdlcdrv_ioctl
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
hdlcdrv-fix-divide-by-zero-in-hdlcdrv_ioctl.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Tue Apr 10 10:31:53 CEST 2018
From: Firo Yang <firogm@gmail.com>
Date: Fri, 26 May 2017 22:37:38 +0800
Subject: hdlcdrv: Fix divide by zero in hdlcdrv_ioctl
From: Firo Yang <firogm@gmail.com>
[ Upstream commit fb3ce90b7d7761b6f7f28f0ff5c456ef6b5229a1 ]
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: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Firo Yang <firogm@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/hamradio/hdlcdrv.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -574,6 +574,8 @@ static int hdlcdrv_ioctl(struct net_devi
case HDLCDRVCTL_CALIBRATE:
if(!capable(CAP_SYS_RAWIO))
return -EPERM;
+ if (s->par.bitrate <= 0)
+ return -EINVAL;
if (bi.data.calibrate > INT_MAX / s->par.bitrate)
return -EINVAL;
s->hdlctx.calibrate = bi.data.calibrate * s->par.bitrate / 16;
Patches currently in stable-queue which might be from firogm@gmail.com are
queue-4.4/hdlcdrv-fix-divide-by-zero-in-hdlcdrv_ioctl.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-04-10 9:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10 9:04 Patch "hdlcdrv: Fix divide by zero in hdlcdrv_ioctl" has been added to the 4.4-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.