]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: Use netlink header as base to calculate bad attribute offset
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 26 Feb 2020 18:47:34 +0000 (19:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2020 06:17:40 +0000 (07:17 +0100)
commit606c02496a0353b97dd615b7c7a43e648a8aad22
tree532573f7cd81f1d593ed9c123909b522a2773c5a
parentfb18be16653cbc1c4c4e6380d6b41987fdda7cbf
netlink: Use netlink header as base to calculate bad attribute offset

[ Upstream commit 88316239d096822f8ce64588eae8805bca2d6b10 ]

Userspace might send a batch that is composed of several netlink
messages. The netlink_ack() function must use the pointer to the netlink
header as base to calculate the bad attribute offset.

Fixes: 3ec49c377cb6 ("netlink: extended ACK reporting")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netlink/af_netlink.c