mesa/src
Marek Vasut c73cc1785a dri: Check buffer height and avoid overflow
The dri2_allocate_buffer() can be called with arbitrary height, however
the struct pipe_resource .height0 member is uint16_t. Check height for
maximum size to avoid overflow. Note that .width0 is unsigned int, so
it does not have the same issue.

The uint16 limit comes from commit:
e6428092f5 ("gallium: decrease the size of pipe_resource - 64 -> 48 bytes")

The overflow can be triggered e.g. by requesting large BO:
```
gbm_bo_create(dev, 1, 640*480*4, GBM_FORMAT_R8, GBM_BO_USE_LINEAR);
```

Signed-off-by: Marek Vasut <marex@denx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16513>
2022-07-09 22:07:14 +00:00
..
amd ac/surface: expose all 64K_R_X and 256K_R_X modifiers on gfx11 2022-07-09 21:00:51 +00:00
android_stub
asahi panfrost,asahi: Use util_sign_extend for unpacking 2022-07-06 11:23:18 +00:00
broadcom v3dv: remove obsolete comment 2022-07-07 09:16:24 +00:00
c11 c11: reinstate the original license and authorship 2022-06-27 11:46:22 +00:00
compiler nir/serialize: restore ray query variables 2022-07-09 00:32:00 +00:00
drm-shim drm-shim: Cleanup on device file close 2022-05-02 19:50:33 +00:00
egl egl/wayland: Don't try to access modifiers u_vector as dynarray 2022-06-23 16:12:15 +00:00
etnaviv etnaviv: drm: rename etna_drm_table_lock 2022-07-03 17:41:55 +00:00
freedreno freedreno/a6xx: Do clip-plane lowering in backend 2022-07-08 20:32:35 +00:00
gallium dri: Check buffer height and avoid overflow 2022-07-09 22:07:14 +00:00
gbm
getopt
glx glx/dri: Fix DRI drawable release at MakeCurrent time 2022-06-27 20:03:26 +00:00
gtest gtest: Fix maybe-uninitialized compiler warning 2022-06-29 21:02:18 +00:00
hgl
imagination pvr: Rename loop iterator variable. 2022-06-24 09:15:53 +00:00
imgui
intel intel/compiler: Don't set SBID on EOT send messages 2022-07-09 05:26:25 +00:00
loader
mapi meson: Using get_argument_syntax as the `--compiler_id` option for gen_vs_module_defs.py 2022-06-16 19:59:58 +00:00
mesa mesa,glsl,ttn: Set subgroup_size to UNIFORM 2022-07-08 22:47:22 +00:00
microsoft dzn: Use fabs on floating point input 2022-07-09 14:04:48 +00:00
nouveau nouveau: Drop C++03 compat code 2022-07-05 13:23:12 +00:00
panfrost panfrost/ci: Disable T760 jobs 2022-07-08 21:33:19 +00:00
tool meson/pps: Check if libdrm exists to compile pps 2022-06-22 11:52:36 +03:00
util util/blob: use memcpy in read functions 2022-07-07 12:25:05 +00:00
virtio venus: Use maintenance4 to get max_size_buffer 2022-07-08 04:27:51 +00:00
vulkan vulkan: Add a vk_pipeline_shader_stage_is_null() helper 2022-07-08 22:47:22 +00:00
meson.build meson: Use cc.get_argument_syntax instead cc.get_id when possible. 2022-06-16 19:59:58 +00:00