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]
Date:   Mon, 18 Nov 2019 14:02:55 +0100
From:   Simon Horman <simon.horman@...ronome.com>
To:     Xin Long <lucien.xin@...il.com>
Cc:     network dev <netdev@...r.kernel.org>, davem@...emloft.net,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Pieter Jansen van Vuuren 
        <pieter.jansenvanvuuren@...ronome.com>
Subject: Re: [PATCH net] net: sched: ensure opts_len <= IP_TUNNEL_OPTS_MAX in
 act_tunnel_key

On Mon, Nov 18, 2019 at 05:39:34PM +0800, Xin Long wrote:
> info->options_len is 'u8' type, and when opts_len with a value >
> IP_TUNNEL_OPTS_MAX, 'info->options_len = opts_len' will cast int
> to u8 and set a wrong value to info->options_len.
> 
> Kernel crashed in my test when doing:
> 
>   # opts="0102:80:00800022"
>   # for i in {1..99}; do opts="$opts,0102:80:00800022"; done
>   # ip link add name geneve0 type geneve dstport 0 external
>   # tc qdisc add dev eth0 ingress
>   # tc filter add dev eth0 protocol ip parent ffff: \
>        flower indev eth0 ip_proto udp action tunnel_key \
>        set src_ip 10.0.99.192 dst_ip 10.0.99.193 \
>        dst_port 6081 id 11 geneve_opts $opts \
>        action mirred egress redirect dev geneve0
> 
> So we should do the similar check as cls_flower does, return error
> when opts_len > IP_TUNNEL_OPTS_MAX in tunnel_key_copy_opts().
> 
> Fixes: 0ed5269f9e41 ("net/sched: add tunnel option support to act_tunnel_key")
> Signed-off-by: Xin Long <lucien.xin@...il.com>

Reviewed-by: Simon Horman <simon.horman@...ronome.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ