linux/drivers/gpu/drm/amd/display/amdgpu_dm
Rodrigo Siqueira 16dd2825c2 drm/amd/display: Adjust VSDB parser for replay feature
At some point, the IEEE ID identification for the replay check in the
AMD EDID was added. However, this check causes the following
out-of-bounds issues when using KASAN:

[   27.804016] BUG: KASAN: slab-out-of-bounds in amdgpu_dm_update_freesync_caps+0xefa/0x17a0 [amdgpu]
[   27.804788] Read of size 1 at addr ffff8881647fdb00 by task systemd-udevd/383

...

[   27.821207] Memory state around the buggy address:
[   27.821215]  ffff8881647fda00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.821224]  ffff8881647fda80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.821234] >ffff8881647fdb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.821243]                    ^
[   27.821250]  ffff8881647fdb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.821259]  ffff8881647fdc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.821268] ==================================================================

This is caused because the ID extraction happens outside of the range of
the edid lenght. This commit addresses this issue by considering the
amd_vsdb_block size.

Cc: ChiaHsuan Chung <chiahsuan.chung@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit b7e381b1cc)
Cc: stable@vger.kernel.org
2024-11-11 14:05:30 -05:00
..
Makefile drm/amd/display: Initialize writeback connector 2023-12-06 15:22:34 -05:00
amdgpu_dm.c drm/amd/display: Adjust VSDB parser for replay feature 2024-11-11 14:05:30 -05:00
amdgpu_dm.h drm/amd/display: Change some variable name of psr 2024-11-11 14:05:11 -05:00
amdgpu_dm_color.c drm/amd/display: Remove plane and stream pointers from dc scratch 2024-03-27 01:43:22 -04:00
amdgpu_dm_crc.c drm/amd/display: Skip writeback connector when we get amdgpu_dm_connector 2023-12-06 15:22:34 -05:00
amdgpu_dm_crc.h drm/amd/display: Fix in secure display context creation 2023-04-24 18:36:46 -04:00
amdgpu_dm_crtc.c drm/amd/display: Fix Panel Replay not update screen correctly 2024-11-11 14:05:15 -05:00
amdgpu_dm_crtc.h
amdgpu_dm_debugfs.c drm/amd/display: Add MST debug message when link detection fails 2024-07-23 17:37:07 -04:00
amdgpu_dm_debugfs.h
amdgpu_dm_hdcp.c drm/amd/display: add amdgpu_dm support for DCN351 2024-03-04 15:59:08 -05:00
amdgpu_dm_hdcp.h
amdgpu_dm_helpers.c drm/amd/display: temp w/a for DP Link Layer compliance 2024-10-22 18:11:20 -04:00
amdgpu_dm_irq.c drm/amd/display: Disable ips before dc interrupt setting 2024-01-25 16:00:24 -05:00
amdgpu_dm_irq.h
amdgpu_dm_irq_params.h drm/amd/display: Change some variable name of psr 2024-11-11 14:05:11 -05:00
amdgpu_dm_mst_types.c drm/amd/display: Restore Optimized pbn Value if Failed to Disable DSC 2024-10-01 18:08:52 -04:00
amdgpu_dm_mst_types.h drm/amd/display: Fix MST BW calculation Regression 2024-08-13 10:48:07 -04:00
amdgpu_dm_plane.c drm/amdgpu: explicitely set the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag 2024-09-18 16:15:09 -04:00
amdgpu_dm_plane.h drm/amd/display: Do cursor programming with rest of pipe 2024-04-30 09:51:30 -04:00
amdgpu_dm_pp_smu.c drm/amd/display: Clean up warnings in amdgpu_dm_pp_smu.c 2023-07-07 13:51:47 -04:00
amdgpu_dm_psr.c drm/amd/display: Fix possible overflow in integer multiplication 2024-07-01 16:06:53 -04:00
amdgpu_dm_psr.h drm/amd/display: Add periodic detection for IPS 2024-04-30 09:57:23 -04:00
amdgpu_dm_replay.c drm/amd/display: Add Replay capability and state in debugfs 2024-05-08 14:56:51 -04:00
amdgpu_dm_replay.h drm/amd/display: Add Replay capability and state in debugfs 2024-05-08 14:56:51 -04:00
amdgpu_dm_services.c drm/amd/display: Add dummy interface for tracing DCN32 SMU messages 2024-04-09 22:03:13 -04:00
amdgpu_dm_trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
amdgpu_dm_wb.c drm/amdgpu: explicitely set the AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag 2024-09-18 16:15:09 -04:00
amdgpu_dm_wb.h drm/amd/display: Create amdgpu_dm_wb_connector 2023-12-06 15:22:35 -05:00
dc_fpu.c drm/amd/display: use ARCH_HAS_KERNEL_FPU_SUPPORT 2024-05-19 14:36:19 -07:00
dc_fpu.h