summaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp_generic.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2005-12-27 13:57:59 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2005-12-27 13:57:59 -0800
commit1b93ae64cabe5e28dd5a1f35f96f938ca4f6ae20 (patch)
treea8c5c7d08e6c658853245ad0b0cf47f0af1ff83d /drivers/net/ppp_generic.c
parent6732badee0dad467fcc9dd0168af8677b2b1bc2f (diff)
downloadlinux-1b93ae64cabe5e28dd5a1f35f96f938ca4f6ae20.tar.gz
linux-1b93ae64cabe5e28dd5a1f35f96f938ca4f6ae20.tar.bz2
linux-1b93ae64cabe5e28dd5a1f35f96f938ca4f6ae20.zip
[NET]: Validate socket filters against BPF_MAXINSNS in one spot.
Currently the checks are scattered all over and this leads to inconsistencies and even cases where the check is not made. Based upon a patch from Kris Katterjohn. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp_generic.c')
-rw-r--r--drivers/net/ppp_generic.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 50430f79f8cf..1c6d328165bb 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -524,9 +524,6 @@ static int get_filter(void __user *arg, struct sock_filter **p)
if (copy_from_user(&uprog, arg, sizeof(uprog)))
return -EFAULT;
- if (uprog.len > BPF_MAXINSNS)
- return -EINVAL;
-
if (!uprog.len) {
*p = NULL;
return 0;