]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: do sanity check payload of a netlink message
authorHoang Le <hoang.h.le@dektech.com.au>
Tue, 15 Dec 2020 03:31:51 +0000 (10:31 +0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Dec 2020 20:45:02 +0000 (12:45 -0800)
commitbaabf7c3fb6effe87d382e7cc1d1870baf7f3182
tree0a502fc7b5170e2c3ccdb823e43825e6cb5983fd
parent4969ec6f071235902a161d673f32452a1251b22d
tipc: do sanity check payload of a netlink message

When we initialize nlmsghdr with no payload inside tipc_nl_compat_dumpit()
the parsing function returns -EINVAL. We fix it by making the parsing call
conditional.

Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Link: https://lore.kernel.org/r/20201215033151.76139-1-hoang.h.le@dektech.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/tipc/netlink_compat.c