Skip to content
Commit 6b79f96f authored by Roberto Sassu's avatar Roberto Sassu Committed by Gerd Hoffmann
Browse files

drm/virtio: Ensure that objs is not NULL in virtio_gpu_array_put_free()



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: default avatarRoberto Sassu <roberto.sassu@huawei.com>
Reported-by: default avatar <syzbot+e9072e90624a31dfa85f@syzkaller.appspotmail.com>
Fixes: 377f8331 ("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: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 2b6dd600
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment