]> git.baikalelectronics.ru Git - kernel.git/commit
tap: double-free in error path in tap_open()
authorGirish Moodalbail <girish.moodalbail@oracle.com>
Wed, 25 Oct 2017 07:23:04 +0000 (00:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Oct 2017 08:57:39 +0000 (17:57 +0900)
commit9a586abcac49054cceb565fdeb8e5db366978193
tree6be52d342cd4ea32359a90ec7aabc96d9b08dd40
parentf17985ba7195dac884a4a5e0f696f06fd38efacd
tap: double-free in error path in tap_open()

Double free of skb_array in tap module is causing kernel panic. When
tap_set_queue() fails we free skb_array right away by calling
skb_array_cleanup(). However, later on skb_array_cleanup() is called
again by tap_sock_destruct through sock_put(). This patch fixes that
issue.

Fixes: ad40c8cd4204dc4d (macvtap: switch to use skb array)
Signed-off-by: Girish Moodalbail <girish.moodalbail@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tap.c