diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 9c80212..05cfee7 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -3314,6 +3314,8 @@ return -EBUSY; if (copy_from_user(&val, optval, sizeof(val))) return -EFAULT; + if (val > INT_MAX) + return -EINVAL; po->tp_reserve = val; return 0; }