Skip to content

Commit a71792d

Browse files
Zhen Leiwildea01
authored andcommitted
iommu/arm-smmu-v3: Prevent any devices access to memory without registration
Stream bypass is a potential security hole since a malicious device can be hotplugged in without matching any drivers, yet be granted the ability to access all of physical memory. Now that we attach devices to domains by default, we can toggle the disable_bypass default to "on", preventing DMA from unknown devices. Signed-off-by: Zhen Lei <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 0d53596 commit a71792d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/arm-smmu-v3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
#define MSI_IOVA_BASE 0x8000000
367367
#define MSI_IOVA_LENGTH 0x100000
368368

369-
static bool disable_bypass;
369+
static bool disable_bypass = 1;
370370
module_param_named(disable_bypass, disable_bypass, bool, S_IRUGO);
371371
MODULE_PARM_DESC(disable_bypass,
372372
"Disable bypass streams such that incoming transactions from devices that are not attached to an iommu domain will report an abort back to the device and will not be allowed to pass through the SMMU.");

0 commit comments

Comments
 (0)