summaryrefslogtreecommitdiff
path: root/include/linux/pm-trace.h
diff options
context:
space:
mode:
authorDavid (Ming Qiang) Wu <David.Wu3@amd.com>2026-08-07 15:12:14 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-08-19 10:12:34 -0400
commit4d7390530853eb7befda9cc786e4c86e8ad7ac9e (patch)
treeed5b15e4bae0b9f45b5be1531e474784e018c532 /include/linux/pm-trace.h
parent275c3332585bbabcefad109a6978cc0cbecf2008 (diff)
downloadlinux-next-4d7390530853eb7befda9cc786e4c86e8ad7ac9e.tar.gz
linux-next-4d7390530853eb7befda9cc786e4c86e8ad7ac9e.zip
drm/amdgpu/vcn: fix integer overflow in dec_msg buffer count check
If the supplied msg[2] (num_buffers) is 0x3FFFFFFF, the expression 6 + num_buffers * 4 wraps to 2 and the bounds check passes, letting the parser loop far past the end of the message BO. Triggering it additionally requires a ~4GiB mapping so that msg[1] survives the earlier "header does not fit in BO" check. Rewrite the test in division form, which is overflow-free by construction. Also update the message to reflect that msg is invalid. Fixes: b193019860d6 ("drm/amdgpu/vcn3: Prevent OOB reads when parsing dec msg") Fixes: 0a78f2bac142 ("drm/amdgpu/vcn4: Prevent OOB reads when parsing dec msg") Cc: stable@vger.kernel.org Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/linux/pm-trace.h')
0 files changed, 0 insertions, 0 deletions