Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2439d4aa authored by Kees Cook's avatar Kees Cook Committed by Joerg Roedel
Browse files

iommu/vt-d: Avoid format string leaks into iommu_device_create



This makes sure it won't be possible to accidentally leak format
strings into iommu device names. Current name allocations are safe,
but this makes the "%s" explicit.

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 74d33293
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1068,7 +1068,7 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
	if (intel_iommu_enabled)
		iommu->iommu_dev = iommu_device_create(NULL, iommu,
						       intel_iommu_groups,
						       iommu->name);
						       "%s", iommu->name);

	return 0;

+1 −1
Original line number Diff line number Diff line
@@ -4533,7 +4533,7 @@ int __init intel_iommu_init(void)
	for_each_active_iommu(iommu, drhd)
		iommu->iommu_dev = iommu_device_create(NULL, iommu,
						       intel_iommu_groups,
						       iommu->name);
						       "%s", iommu->name);

	bus_set_iommu(&pci_bus_type, &intel_iommu_ops);
	bus_register_notifier(&pci_bus_type, &device_nb);