]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:42:13 +0000 (19:42 -0600)
commit4d07ce917a9dc5598b0f35487262ce1a1b259782
treed7a76d882701a12588ac60720dee560b367edbec
parentf6d79077cf8d5911e6fc12a02c8ba89c2dcff6c7
vhost: reset metadata cache when initializing new IOTLB

BugLink: https://bugs.launchpad.net/bugs/1835845
[ Upstream commit b13f9c6364373a1b9f71e9846dc4fb199296f926 ]

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: f88949138058 ("vhost: introduce O(1) vq metadata cache")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/vhost/vhost.c