diff options
author | Roberto Sassu <roberto.sassu@huawei.com> | 2021-12-13 19:31:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-28 09:58:45 +0200 |
commit | b094fece3810c71ceee6f0921676cb65d4e68c5a (patch) | |
tree | 86ec43370952fb3e9c1936c764d0abdfd21c8d61 /kernel/rcu/tree_plugin.h | |
parent | 5023652cc6e490ca94b0beb29d6f2496623451f9 (diff) | |
download | linux-stable-b094fece3810c71ceee6f0921676cb65d4e68c5a.tar.gz linux-stable-b094fece3810c71ceee6f0921676cb65d4e68c5a.tar.bz2 linux-stable-b094fece3810c71ceee6f0921676cb65d4e68c5a.zip |
drm/virtio: Ensure that objs is not NULL in virtio_gpu_array_put_free()
commit 6b79f96f4a23846516e5e6e4dd37fc06f43a60dd upstream.
If virtio_gpu_object_shmem_init() fails (e.g. due to fault injection, as it
happened in the bug report by syzbot), virtio_gpu_array_put_free() could be
called with objs equal to NULL.
Ensure that objs is not NULL in virtio_gpu_array_put_free(), or otherwise
return from the function.
Cc: stable@vger.kernel.org # 5.13.x
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Reported-by: syzbot+e9072e90624a31dfa85f@syzkaller.appspotmail.com
Fixes: 377f8331d0565 ("drm/virtio: fix possible leak/unlock virtio_gpu_object_array")
Link: http://patchwork.freedesktop.org/patch/msgid/20211213183122.838119-1-roberto.sassu@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
0 files changed, 0 insertions, 0 deletions