Johannes Berg
c30bc94758
netlink: validate NLA_MSECS length
...
L2TP for example uses NLA_MSECS like this:
policy:
[L2TP_ATTR_RECV_TIMEOUT] = { .type = NLA_MSECS, },
code:
if (info->attrs[L2TP_ATTR_RECV_TIMEOUT])
cfg.reorder_timeout = nla_get_msecs(info->attrs[L2TP_ATTR_RECV_TIMEOUT]);
As nla_get_msecs() is essentially nla_get_u64() plus the
conversion to a HZ-based value, this will not properly
reject attributes from userspace that aren't long enough
and might overrun the message.
Add NLA_MSECS to the attribute minlen array to check the
size properly.
Cc: Thomas Graf <tgraf@suug.ch >
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2011-11-04 17:47:34 -04:00
..
2011-10-20 11:27:50 +11:00
2011-09-21 13:39:59 -07:00
2011-03-22 17:44:17 -07:00
2011-07-26 16:49:47 -07:00
2011-09-14 13:14:11 +02:00
2011-05-04 14:41:28 -04:00
2010-12-06 15:58:43 -05:00
2011-03-11 14:25:50 +00:00
2011-10-31 17:30:56 -07:00
2011-05-19 16:55:27 +09:30
2011-03-31 11:26:23 -03:00
2011-07-07 04:52:24 -07:00
2011-06-03 15:01:07 -04:00
2011-01-24 14:51:56 -08:00
2011-07-26 16:49:44 -07:00
2011-06-03 15:01:06 -04:00
2011-07-26 16:49:47 -07:00
2010-11-29 15:18:28 -08:00
2011-06-20 14:38:43 +02:00
2011-07-26 16:49:47 -07:00
2011-01-13 08:03:23 -08:00
2011-01-13 08:03:25 -08:00
2011-01-13 08:03:24 -08:00
2011-01-13 08:03:24 -08:00
2011-03-31 11:26:23 -03:00
2011-01-13 08:03:25 -08:00
2011-07-25 20:57:14 -07:00
2011-08-23 15:36:00 +02:00
2011-10-25 12:13:59 +02:00
2011-10-26 16:32:11 -04:00
2011-05-26 17:12:38 -07:00
2011-05-26 17:12:38 -07:00
2011-05-26 17:12:33 -07:00
2011-08-03 11:15:57 -04:00
2011-09-20 23:24:44 -04:00
2011-11-02 16:07:00 -07:00
2011-07-22 18:46:26 +02:00
2011-01-12 03:06:19 -05:00
2011-10-04 11:30:53 +02:00
2011-10-31 17:30:51 -07:00
2011-08-22 18:31:24 -07:00
2011-06-12 17:45:41 -04:00
2011-10-31 17:30:56 -07:00
2011-10-31 17:30:56 -07:00
2011-07-25 20:57:15 -07:00
2011-02-18 11:32:28 -08:00
2011-10-04 12:44:03 +02:00
2011-05-26 09:42:19 -07:00
2011-05-25 08:39:52 -07:00
2011-10-04 11:30:53 +02:00
2011-08-06 18:32:45 -07:00
2011-11-04 17:47:34 -04:00
2011-03-31 11:26:23 -03:00
2011-10-31 17:30:56 -07:00
2011-07-08 14:02:53 +02:00
2011-09-13 11:11:50 +02:00
2011-10-31 17:30:45 -07:00
2011-09-13 11:11:54 +02:00
2011-01-28 12:16:59 +10:00
2011-09-13 11:11:59 +02:00
2011-09-13 11:11:59 +02:00
2011-09-13 16:09:41 -07:00
2011-05-25 08:39:03 -07:00
2011-10-06 12:46:56 +02:00
2011-10-31 17:30:56 -07:00
2011-10-31 17:30:56 -07:00
2011-06-06 15:41:16 -04:00
2011-04-14 16:06:54 -07:00
2011-01-24 23:33:30 -08:00
2011-03-31 11:26:23 -03:00
2011-10-31 17:30:56 -07:00