Skip to content

Commit f539a2b

Browse files
pvts-matPlaidCat
authored andcommitted
udmabuf: fix a buf size overflow issue during udmabuf creation
jira VULN-67673 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 65b7664 commit f539a2b

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
@@ -186,7 +186,7 @@ static long udmabuf_create(struct miscdevice *device,
186186
if (!ubuf)
187187
return -ENOMEM;
188188

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

0 commit comments

Comments
 (0)