]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: extack needs to be reset each time through loop
authorDavid Ahern <dsahern@gmail.com>
Wed, 10 Jan 2018 21:00:39 +0000 (13:00 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Jan 2018 18:50:07 +0000 (13:50 -0500)
commit48c2d82dd9756b34ab339802167acb997de392e0
treef8db54b9ab381bbde880ab1d2b869730c48a3eaf
parentbb8401b72d4b31302dc13c2b66db4cffba9ab34e
netlink: extack needs to be reset each time through loop

syzbot triggered the WARN_ON in netlink_ack testing the bad_attr value.
The problem is that netlink_rcv_skb loops over the skb repeatedly invoking
the callback and without resetting the extack leaving potentially stale
data. Initializing each time through avoids the WARN_ON.

Fixes: 5601c9fcd324c ("netlink: extended ACK reporting")
Reported-by: syzbot+315fa6766d0f7c359327@syzkaller.appspotmail.com
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c