diff options
| author | Johannes Berg <[email protected]> | 2011-11-03 00:07:32 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2011-11-04 21:47:34 +0000 |
| commit | c30bc94758ae2a38a5eb31767c1985c0aae0950b (patch) | |
| tree | 2b8e0565fe338a56cecc23ce299590c44e4438b6 /lib/mpi/mpi-bit.c | |
| parent | i825xx:xscale:8390:freescale: Fix Kconfig dependancies (diff) | |
| download | kernel-c30bc94758ae2a38a5eb31767c1985c0aae0950b.tar.gz kernel-c30bc94758ae2a38a5eb31767c1985c0aae0950b.zip | |
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 <[email protected]>
Cc: [email protected]
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions
