artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c37b096
)
drm/amdgpu: Validate TA binary size
author
jsg
<jsg@openbsd.org>
Fri, 30 Aug 2024 04:20:12 +0000
(
04:20
+0000)
committer
jsg
<jsg@openbsd.org>
Fri, 30 Aug 2024 04:20:12 +0000
(
04:20
+0000)
From Candice Li
50553ea7cbd3344fbf40afb065f6a2d38171c1ad
in linux-6.6.y/6.6.48
c99769bceab4ecb6a067b9af11f9db281eea3e2a
in mainline linux
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp_ta.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp_ta.c
b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp_ta.c
index
8e8afbd
..
9aff579
100644
(file)
--- a/
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp_ta.c
+++ b/
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp_ta.c
@@
-166,6
+166,9
@@
static ssize_t ta_if_load_debugfs_write(struct file *fp, const char *buf, size_t
if (ret)
return -EFAULT;
+ if (ta_bin_len > PSP_1_MEG)
+ return -EINVAL;
+
copy_pos += sizeof(uint32_t);
ta_bin = kzalloc(ta_bin_len, GFP_KERNEL);