summaryrefslogtreecommitdiff
path: root/drivers/gpu/nova-core/fsp/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorYousef Alhouseen <alhouseenyousef@gmail.com>2026-06-27 00:38:05 +0200
committerJuergen Gross <jgross@suse.com>2026-07-01 09:58:24 +0200
commit2299822f3f466b5dcad2377bf63986199f881a6b (patch)
tree85cf270d2b529a29dd6e0394052529a0ada62cf7 /drivers/gpu/nova-core/fsp/git@git.tavy.me:linux.git
parent51d111301a3ad8e5655687cb6462182e5804fa02 (diff)
xen/gntalloc: validate grant count before allocation
gntalloc_ioctl_alloc() allocates the grant-id array before checking whether the requested count fits within the global grant limit. Counts above that limit cannot succeed, so reject them before the user-controlled allocation reaches kcalloc(). Use a subtraction-based check while holding gref_mutex so adding the requested count cannot wrap. Also cast the count before advancing the per-file index so the page-size multiplication is performed in 64-bit arithmetic. Signed-off-by: Yousef Alhouseen <alhouseenyousef@gmail.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20260626223805.43781-3-alhouseenyousef@gmail.com>
Diffstat (limited to 'drivers/gpu/nova-core/fsp/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions