Re: [PATCH] ipvs: Add boundary check on ioctl arguments
From: Hannes Eder <hidden>
Date: 2009-09-30 15:33:10
Also in:
lkml
From: Hannes Eder <hidden>
Date: 2009-09-30 15:33:10
Also in:
lkml
On Wed, Sep 30, 2009 at 17:18, Arjan van de Ven [off-list ref] wrote:
On Wed, 30 Sep 2009 15:38:12 +0200 Hannes Eder [off-list ref] wrote:quoted
> @@ -2353,17 +2357,25 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, > void __user *user, int *len) > { > unsigned char arg[128]; can MAX_ARG_LEN be used here?I am not convinced... it is a different numerical value, so it could be an ABI change. Rather not do that in this type of patch...
For do_ip_vs_set_ctl MAX_ARG_LEN is used:
static int
do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len)
{
int ret;
unsigned char arg[MAX_ARG_LEN];
...
I assume that will be fine for do_ip_vs_get_ctl as well.
-Hannes