summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-03 00:07:32 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-11 09:44:43 -0800
commit61ec3a5696f0c32448c93b713f934b007b85f961 (patch)
tree457b77f5305517b77e732e5335bd4cd823cdedd2 /virt
parent0fb9f687964a4b4a557b4f2e8676e1236a9e269b (diff)
downloadlinux-stable-61ec3a5696f0c32448c93b713f934b007b85f961.tar.gz
linux-stable-61ec3a5696f0c32448c93b713f934b007b85f961.tar.bz2
linux-stable-61ec3a5696f0c32448c93b713f934b007b85f961.zip
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>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions