]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: reset metadata cache when initializing new IOTLB
authorJason Wang <jasowang@redhat.com>
Wed, 8 Aug 2018 03:43:04 +0000 (11:43 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Aug 2018 16:44:39 +0000 (09:44 -0700)
commit6d7545eabe55dc5001d8b5abfa3587a15c269c66
tree904d5ecac4a32d9ed7408547200fcbf3a7fe1e30
parent7789923c56e6735423b0f6d3e83f5415ec92cc1d
vhost: reset metadata cache when initializing new IOTLB

We need to reset metadata cache during new IOTLB initialization,
otherwise the stale pointers to previous IOTLB may be still accessed
which will lead a use after free.

Reported-by: syzbot+c51e6736a1bf614b3272@syzkaller.appspotmail.com
Fixes: 52f88933c005 ("vhost: introduce O(1) vq metadata cache")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/vhost.c