]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/radeon: Fix integer overflow in radeon_cs_parser_init
authorhackyzh002 <hackyzh002@gmail.com>
Wed, 19 Apr 2023 12:20:58 +0000 (20:20 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 21 Apr 2023 12:50:21 +0000 (08:50 -0400)
commitf828b681d0cd566f86351c0b913e6cb6ed8c7b9c
tree77b8f06dfe8d10fb98770b9583ee9209e4495c85
parent4f63b7a59926eb7fb50091e796170a10a8ef4091
drm/radeon: Fix integer overflow in radeon_cs_parser_init

The type of size is unsigned, if size is 0x40000000, there will be an
integer overflow, size will be zero after size *= sizeof(uint32_t),
will cause uninitialized memory to be referenced later

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: hackyzh002 <hackyzh002@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_cs.c