Commit f87c3f42 authored by Alexey Kuznetsov's avatar Alexey Kuznetsov Committed by David S. Miller

Terrible bug in ipv4/route.c, mis-sized ip_rt_acct leads to

complete memory corruption.
parent 374e751b
...@@ -2454,7 +2454,7 @@ void __init ip_rt_init(void) ...@@ -2454,7 +2454,7 @@ void __init ip_rt_init(void)
#ifdef CONFIG_NET_CLS_ROUTE #ifdef CONFIG_NET_CLS_ROUTE
for (order = 0; for (order = 0;
(PAGE_SIZE << order) < 256 * sizeof(ip_rt_acct) * NR_CPUS; order++) (PAGE_SIZE << order) < 256 * sizeof(struct ip_rt_acct) * NR_CPUS; order++)
/* NOTHING */; /* NOTHING */;
ip_rt_acct = (struct ip_rt_acct *)__get_free_pages(GFP_KERNEL, order); ip_rt_acct = (struct ip_rt_acct *)__get_free_pages(GFP_KERNEL, order);
if (!ip_rt_acct) if (!ip_rt_acct)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment