Files
kernel-tenderloin-3.0/lib
Johannes Berg 6167ded569 netlink: validate NLA_MSECS length
commit c30bc94758ae2a38a5eb31767c1985c0aae0950b upstream.

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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11 09:37:12 -08:00
..
2011-10-03 11:40:37 -07:00
2011-03-11 14:25:50 +00:00
2011-06-15 20:03:59 -07:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2010-07-11 22:16:32 +02:00
2010-05-25 08:07:06 -07:00
2010-04-06 15:52:11 -07:00
2010-08-09 20:45:05 -07:00
2011-06-01 16:06:04 -04:00
2010-11-22 13:25:13 +10:00
2011-05-25 08:39:52 -07:00
2011-08-15 18:31:35 -07:00
2011-11-11 09:37:12 -08:00
2011-03-31 11:26:23 -03:00
2011-03-11 15:14:48 -05:00
2010-06-16 18:08:13 +02:00
2010-01-11 09:34:05 -08:00
2011-03-31 11:26:23 -03:00
2010-05-19 22:40:47 -04:00