Skip to content
Commit 361c17d1 authored by Phillip Potter's avatar Phillip Potter Committed by Greg Kroah-Hartman
Browse files

net: tun: set tun->dev->addr_len during TUNSETLINK processing

commit cca8ea3b

 upstream.

When changing type with TUNSETLINK ioctl command, set tun->dev->addr_len
to match the appropriate type, using new tun_get_addr_len utility function
which returns appropriate address length for given type. Fixes a
KMSAN-found uninit-value bug reported by syzbot at:
https://syzkaller.appspot.com/bug?id=0766d38c656abeace60621896d705743aeefed51

Reported-by: default avatar <syzbot+001516d86dbe88862cec@syzkaller.appspotmail.com>
Diagnosed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarPhillip Potter <phil@philpotter.co.uk>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b334cdb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment