Dave Jones
1086bbe97a
netfilter: ensure number of counters is >0 in do_replace()
...
After improving setsockopt() coverage in trinity, I started triggering
vmalloc failures pretty reliably from this code path:
warn_alloc_failed+0xe9/0x140
__vmalloc_node_range+0x1be/0x270
vzalloc+0x4b/0x50
__do_replace+0x52/0x260 [ip_tables]
do_ipt_set_ctl+0x15d/0x1d0 [ip_tables]
nf_setsockopt+0x65/0x90
ip_setsockopt+0x61/0xa0
raw_setsockopt+0x16/0x60
sock_common_setsockopt+0x14/0x20
SyS_setsockopt+0x71/0xd0
It turns out we don't validate that the num_counters field in the
struct we pass in from userspace is initialized.
The same problem also exists in ebtables, arptables, ipv6, and the
compat variants.
Signed-off-by: Dave Jones <davej@codemonkey.org.uk >
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org >
2015-05-20 13:46:49 +02:00
..
2015-05-20 13:46:49 +02:00
2015-04-03 12:11:15 -04:00
2014-09-18 10:54:36 +02:00
2015-04-07 15:25:55 -04:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-04-06 22:34:15 -04:00
2015-03-11 16:22:14 -04:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-05-14 22:45:39 -04:00
2015-04-16 12:11:19 -04:00
2015-04-14 15:44:14 -04:00
2014-09-08 15:23:05 -07:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-04-24 11:39:15 -04:00
2015-04-29 17:10:38 -04:00
2015-04-03 12:11:15 -04:00
2015-04-13 16:40:05 -04:00
2015-04-13 16:40:05 -04:00
2014-09-08 16:42:42 -07:00
2015-04-20 14:07:33 -04:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-04-07 15:25:55 -04:00
2015-04-03 12:11:15 -04:00
2015-04-07 22:24:37 -04:00
2015-04-03 12:11:15 -04:00
2015-04-08 12:09:42 -04:00
2015-04-07 15:29:08 -04:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-04-03 12:11:15 -04:00
2015-04-07 15:25:55 -04:00
2014-11-05 16:30:02 -05:00
2014-10-06 00:32:20 -04:00
2015-04-04 12:25:22 -04:00
2015-05-01 22:02:47 -04:00
2015-04-13 16:40:05 -04:00
2014-09-19 17:15:31 -04:00
2015-04-13 18:18:05 -04:00
2015-04-29 14:43:22 -04:00
2015-03-25 00:57:48 -04:00
2015-04-03 12:11:15 -04:00
2015-01-28 22:18:37 -08:00
2015-03-20 18:51:09 -04:00
2015-03-11 16:51:51 -04:00
2015-04-29 17:10:38 -04:00
2015-04-03 12:11:15 -04:00
2015-04-29 17:10:37 -04:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2014-09-01 18:12:45 -07:00
2015-04-29 17:10:38 -04:00
2015-04-29 17:10:38 -04:00
2015-04-24 11:39:15 -04:00
2015-02-12 18:54:10 -08:00
2015-04-07 18:36:39 -04:00
2015-05-17 23:41:59 -04:00
2015-02-28 16:56:51 -05:00
2015-04-24 11:06:48 -04:00
2014-09-01 18:12:45 -07:00
2015-01-28 22:18:37 -08:00
2015-04-07 18:36:39 -04:00
2015-04-29 17:10:38 -04:00
2015-04-29 17:10:38 -04:00
2015-01-28 22:18:37 -08:00
2015-05-05 19:50:09 -04:00
2015-01-28 22:18:37 -08:00
2015-04-29 17:10:38 -04:00
2015-04-03 12:11:15 -04:00
2015-03-02 13:06:31 -05:00
2015-04-03 12:11:15 -04:00
2015-04-07 15:29:08 -04:00
2015-04-07 22:24:37 -04:00
2015-04-07 15:25:55 -04:00
2015-03-25 14:07:04 -04:00
2015-04-07 15:25:55 -04:00
2015-04-03 12:11:15 -04:00