summaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp/ppp_async.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ppp/ppp_async.c')
-rw-r--r--drivers/net/ppp/ppp_async.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index 15a179631..abc65c4d7 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -469,6 +469,10 @@ ppp_async_ioctl(struct ppp_channel *chan, unsigned int cmd, unsigned long arg)
case PPPIOCSMRU:
if (get_user(val, p))
break;
+ if (val > U16_MAX) {
+ err = -EINVAL;
+ break;
+ }
if (val < PPP_MRU)
val = PPP_MRU;
ap->mru = val;