lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fc9e36bd-bb47-f868-c614-1dd2412048ce@gmail.com>
Date:   Fri, 7 Jun 2019 09:51:32 -0600
From:   David Ahern <dsahern@...il.com>
To:     George Wilkie <gwilkie@...tta.att-mail.com>,
        "David S. Miller" <davem@...emloft.net>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net] mpls: fix warning with multi-label encap

On 6/7/19 9:49 AM, David Ahern wrote:
> On 6/7/19 4:49 AM, George Wilkie wrote:
>> If you configure a route with multiple labels, e.g.
>>   ip route add 10.10.3.0/24 encap mpls 16/100 via 10.10.2.2 dev ens4
>> A warning is logged:
>>   kernel: [  130.561819] netlink: 'ip': attribute type 1 has an invalid
>>   length.
>>
>> This happens because mpls_iptunnel_policy has set the type of
>> MPLS_IPTUNNEL_DST to fixed size NLA_U32.
>> Change it to a minimum size.
>> nla_get_labels() does the remaining validation.
>>
>> Signed-off-by: George Wilkie <gwilkie@...tta.att-mail.com>
>> ---
>>  net/mpls/mpls_iptunnel.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/mpls/mpls_iptunnel.c b/net/mpls/mpls_iptunnel.c
>> index 951b52d5835b..20c682143b01 100644
>> --- a/net/mpls/mpls_iptunnel.c
>> +++ b/net/mpls/mpls_iptunnel.c
>> @@ -28,7 +28,7 @@
>>  #include "internal.h"
>>  
>>  static const struct nla_policy mpls_iptunnel_policy[MPLS_IPTUNNEL_MAX + 1] = {
>> -	[MPLS_IPTUNNEL_DST]	= { .type = NLA_U32 },
>> +	[MPLS_IPTUNNEL_DST]	= { .len = sizeof(u32) },
>>  	[MPLS_IPTUNNEL_TTL]	= { .type = NLA_U8 },
>>  };
>>  
>>
> 
> MPLS_IPTUNNEL_DST is an array of u32's so that looks correct
> 
> Reviewed-by: David Ahern <dsahern@...il.com>
> 

Fixes tag:

Fixes: e3e4712ec096 ("mpls: ip tunnel support")

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ