linux/drivers/gpu/drm/virtio
Roberto Sassu 6b79f96f4a 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: Roberto Sassu <roberto.sassu@huawei.com>
Reported-by: syzbot+e9072e90624a31dfa85f@syzkaller.appspotmail.com
Fixes: 377f8331d0 ("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>
2022-01-18 07:52:42 +01:00
..
Kconfig drivers: gpu: drm: virtio: fix dependency of DRM_VIRTIO_GPU on VIRTIO 2020-12-22 13:43:29 +01:00
Makefile drm/virtio: implement blob resources: implement vram object 2020-09-29 11:23:33 +02:00
virtgpu_debugfs.c drm/virtio: implement context init: probe for feature 2021-09-29 09:22:30 +02:00
virtgpu_display.c drm/virtio: fix the missed drm_gem_object_put() in virtio_gpu_user_framebuffer_create() 2021-10-11 11:16:45 +02:00
virtgpu_drv.c Linux 5.16-rc5 2021-12-14 10:24:28 +01:00
virtgpu_drv.h drm/virtgpu api: define a dummy fence signaled event 2021-11-29 11:46:32 +01:00
virtgpu_fence.c drm/virtio: implement context init: add virtio_gpu_fence_event 2021-09-29 09:22:31 +02:00
virtgpu_gem.c drm/virtio: Ensure that objs is not NULL in virtio_gpu_array_put_free() 2022-01-18 07:52:42 +01:00
virtgpu_ioctl.c Linux 5.16-rc5 2021-12-14 10:24:28 +01:00
virtgpu_kms.c drm/virtio: implement context init: probe for feature 2021-09-29 09:22:30 +02:00
virtgpu_object.c drm: Return error codes from struct drm_driver.gem_create_object 2021-12-02 11:12:39 +01:00
virtgpu_plane.c drm/virtio: implement context init: plumb {base_fence_ctx, ring_idx} to virtio_gpu_fence_alloc 2021-09-29 09:22:30 +02:00
virtgpu_prime.c drm/virtio: support mapping exported vram 2021-08-16 14:09:40 +02:00
virtgpu_trace.h
virtgpu_trace_points.c
virtgpu_vq.c drm/virtio: implement context init: stop using drv->context when creating fence 2021-09-29 09:22:31 +02:00
virtgpu_vram.c drm/virtio: support mapping exported vram 2021-08-16 14:09:40 +02:00