Skip to content

Commit 4dd6ce4

Browse files
Dan Carpenterjoergroedel
authored andcommitted
iommu: Fix a check in iommu_check_bind_data()
The "data->flags" variable is a u64 so if one of the high 32 bits is set the original code will allow it, but it should be rejected. The fix is to declare "mask" as a u64 instead of a u32. Fixes: d905738 ("iommu/uapi: Handle data and argsz filled by users") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20201103101623.GA1127762@mwanda Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 71cd8e2 commit 4dd6ce4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iommu/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2071,7 +2071,7 @@ EXPORT_SYMBOL_GPL(iommu_uapi_cache_invalidate);
20712071

20722072
static int iommu_check_bind_data(struct iommu_gpasid_bind_data *data)
20732073
{
2074-
u32 mask;
2074+
u64 mask;
20752075
int i;
20762076

20772077
if (data->version != IOMMU_GPASID_BIND_VERSION_1)

0 commit comments

Comments
 (0)