Skip to content

Commit a63aa33

Browse files
pvts-matPlaidCat
authored andcommitted
udmabuf: fix a buf size overflow issue during udmabuf creation
jira VULN-67674 cve CVE-2025-37803 commit-author Xiaogang Chen <xiaogang.chen@amd.com> commit 021ba7f by casting size_limit_mb to u64 when calculate pglimit. Signed-off-by: Xiaogang Chen<Xiaogang.Chen@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250321164126.329638-1-xiaogang.chen@amd.com Signed-off-by: Christian König <christian.koenig@amd.com> (cherry picked from commit 021ba7f) Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
1 parent fc97464 commit a63aa33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma-buf/udmabuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static long udmabuf_create(struct miscdevice *device,
212212
if (!ubuf)
213213
return -ENOMEM;
214214

215-
pglimit = (size_limit_mb * 1024 * 1024) >> PAGE_SHIFT;
215+
pglimit = ((u64)size_limit_mb * 1024 * 1024) >> PAGE_SHIFT;
216216
for (i = 0; i < head->count; i++) {
217217
if (!IS_ALIGNED(list[i].offset, PAGE_SIZE))
218218
goto err;

0 commit comments

Comments
 (0)