Re: [PATCH] net: sysctl_net_core: check SNDBUF and RCVBUF for min length

From: David Miller
Date: Wed Mar 11 2015 - 21:25:54 EST


From: Alexey Kodanev <alexey.kodanev@xxxxxxxxxx>
Date: Wed, 11 Mar 2015 14:29:17 +0300

> sysctl has sysctl.net.core.rmem_*/wmem_* parameters which can be
> set to incorrect values. Given that 'struct sk_buff' allocates from
> rcvbuf, incorrectly set buffer length could result to memory
> allocation failures. For example, set them as follows:
>
> # sysctl net.core.rmem_default=64
> net.core.wmem_default = 64
> # sysctl net.core.wmem_default=64
> net.core.wmem_default = 64
> # ping localhost -s 1024 -i 0 > /dev/null
>
> This could result to the following failure:
...
> Signed-off-by: Alexey Kodanev <alexey.kodanev@xxxxxxxxxx>

Applied, but someone needs to followup with fixes to AF_UNIX etc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/