From: Amelia Crate <acrate@waldn.net>
To: gregkh@linuxfoundation.org
Cc: dimitri.ledkov@surgut.co.uk, stable@vger.kernel.org,
Xiaogang Chen <xiaogang.chen@amd.com>,
Amelia Crate <acrate@waldn.net>
Subject: [PATCH v2 2/4] udmabuf: fix a buf size overflow issue during udmabuf creation
Date: Thu, 30 Oct 2025 11:08:32 -0500 [thread overview]
Message-ID: <20251030160942.19490-3-acrate@waldn.net> (raw)
In-Reply-To: <20251030160942.19490-1-acrate@waldn.net>
From: Xiaogang Chen <xiaogang.chen@amd.com>
[ Upstream commit 021ba7f1babd029e714d13a6bf2571b08af96d0f ]
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>
Signed-off-by: Amelia Crate <acrate@waldn.net>
---
drivers/dma-buf/udmabuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 0e127a9109e7..2e5c30f7ba0f 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -350,7 +350,7 @@ static long udmabuf_create(struct miscdevice *device,
return -ENOMEM;
INIT_LIST_HEAD(&ubuf->unpin_list);
- pglimit = (size_limit_mb * 1024 * 1024) >> PAGE_SHIFT;
+ pglimit = ((u64)size_limit_mb * 1024 * 1024) >> PAGE_SHIFT;
for (i = 0; i < head->count; i++) {
if (!PAGE_ALIGNED(list[i].offset))
goto err;
--
2.50.1
next prev parent reply other threads:[~2025-10-30 16:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 22:24 [PATCH 0/4] Backport CVE fixes to 6.12.y Amelia Crate
2025-10-29 22:25 ` [PATCH 1/4] iommu/vt-d: Avoid use of NULL after WARN_ON_ONCE Amelia Crate
2025-10-29 22:26 ` [PATCH 2/4] udmabuf: fix a buf size overflow issue during udmabuf creation Amelia Crate
2025-10-29 22:27 ` [PATCH 3/4] wifi: ath12k: fix read pointer after free in ath12k_mac_assign_vif_to_vdev() Amelia Crate
2025-10-29 22:27 ` [PATCH 4/4] sfc: fix NULL dereferences in ef100_process_design_param() Amelia Crate
2025-10-30 5:26 ` [PATCH 0/4] Backport CVE fixes to 6.12.y Greg KH
2025-10-30 16:08 ` [PATCH v2 " Amelia Crate
2025-10-30 16:08 ` [PATCH v2 1/4] iommu/vt-d: Avoid use of NULL after WARN_ON_ONCE Amelia Crate
2025-10-30 16:08 ` Amelia Crate [this message]
2025-10-30 16:08 ` [PATCH v2 3/4] wifi: ath12k: fix read pointer after free in ath12k_mac_assign_vif_to_vdev() Amelia Crate
2025-10-30 16:08 ` [PATCH v2 4/4] sfc: fix NULL dereferences in ef100_process_design_param() Amelia Crate
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251030160942.19490-3-acrate@waldn.net \
--to=acrate@waldn.net \
--cc=dimitri.ledkov@surgut.co.uk \
--cc=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
--cc=xiaogang.chen@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox