]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: check link name with right length in tipc_nl_compat_link_set
authorXin Long <lucien.xin@gmail.com>
Sun, 31 Mar 2019 14:50:09 +0000 (22:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 Mar 2019 23:45:57 +0000 (16:45 -0700)
commit30b5a33acacfd128d10cc0785fd320026ea5aa62
tree8904600a024d55772611363c2d7def30bbeaa612
parent077f5512a04a59d398bbe0d6657b78e95ff267f2
tipc: check link name with right length in tipc_nl_compat_link_set

A similar issue as fixed by Patch "tipc: check bearer name with right
length in tipc_nl_compat_bearer_enable" was also found by syzbot in
tipc_nl_compat_link_set().

The length to check with should be 'TLV_GET_DATA_LEN(msg->req) -
offsetof(struct tipc_link_config, name)'.

Reported-by: syzbot+de00a87b8644a582ae79@syzkaller.appspotmail.com
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/netlink_compat.c