Bug 2280152 - Missing IOMMU hardening: enable CONFIG_IOMMU_DEFAULT_DMA_STRICT=1
Summary: Missing IOMMU hardening: enable CONFIG_IOMMU_DEFAULT_DMA_STRICT=1
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-12 16:09 UTC by jvoisin
Modified: 2024-06-26 18:36 UTC (History)
16 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-06-26 18:36:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description jvoisin 2024-05-12 16:09:21 UTC
1. Please describe the problem:
It's currently possible for malicious devices to access stable data content. Having CONFIG_IOMMU_DEFAULT_DMA_STRICT=y would force proper IOMMU TLB invalidation, preventing this from happening.

This setting is recommended upstream: https://github.com/torvalds/linux/blob/master/kernel/configs/hardening.config#L72

The only possible issue would be that it might affect the performances on some platforms with cursed drivers.

2. What is the Version-Release number of the kernel:

N/A

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

No.

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

Yes, rebuild with CONFIG_IOMMU_DEFAULT_DMA_STRICT, notice that nothing breaks on my machine™. No need to rebuild the kernel if you're lazy, this option is equivalent to `iommu.passthrough=0 iommu.strict=1`


5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

N/A

6. Are you running any modules that not shipped with directly Fedora's kernel?:

N/A

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

N/A

Reproducible: Always

Comment 1 Justin M. Forbes 2024-05-17 16:49:42 UTC
Will need to research this again, when it came in, I turned it on and it caused issues so was turned off.

Comment 2 jvoisin 2024-05-17 18:59:20 UTC
Do you have details about what kind of issues it caused?

Comment 3 Justin M. Forbes 2024-06-26 18:36:39 UTC
Yes, it turns out it is a significant performance impact. More details are available at: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3952


Note You need to log in before you can comment on or make changes to this bug.