Skip to content

CPU vulnerability mitigations

Ditana enables CPU vulnerability mitigations in High Security mode by default. The installer detects which mitigations your specific CPU needs by reading /sys/devices/system/cpu/vulnerabilities/, then offers each as an individually-toggleable checkbox in the Expert Settings → CPU Vulnerability Mitigation Options dialog. This page documents every option in detail.

Default kernel settings vs Ditana’s mitigations

Section titled “Default kernel settings vs Ditana’s mitigations”

The upstream Linux defaults balance security against performance and leave certain vulnerabilities unmitigated unless explicitly opted in. Ditana opts in by default — for most workloads the cost is negligible, while the security benefit is substantial. You can revert any individual mitigation in the installer if you have a workload that demonstrably benefits.

The mitigation logic is hardware-specific. Only the vulnerabilities your CPU actually exhibits are configured; everything else is left at the kernel default.

Several mitigations involve disabling Simultaneous Multi-Threading (SMT, also known as Hyper-Threading) as a fallback. Ditana’s custom terminal header shows which mitigations are active and whether SMT is on or off.

You can also verify with:

Terminal window
lscpu

To compare performance with and without a specific mitigation, reboot, press e at the GRUB menu, and edit the kernel command line — remove the parameter for the mitigation you want to test. The parameters are listed below under “Applied mitigation” for each entry. Reboot and run your real workload (synthetic benchmarks rarely reflect actual impact).

To make a change permanent, edit /etc/default/grub, find the GRUB_CMDLINE_LINUX_DEFAULT line (back it up first), remove the parameter, then run:

Terminal window
sudo grub-mkconfig -o /boot/grub/grub.cfg

If a change prevents booting, edit the kernel command line in the GRUB menu to recover, then repeat the edit and grub-mkconfig.

Spectre variant 2 — Branch Target Injection

Section titled “Spectre variant 2 — Branch Target Injection”

Speculative execution exploit allowing attackers to read sensitive data via mistrained indirect branch predictors. Ditana applies the full mitigation (Indirect Branch Prediction Barrier always-on rather than conditional).

All Spectre variant 2 mitigations can be forced on at boot time for all programs. This will add overhead as indirect branch speculations for all programs will be restricted.

kernel.org: Spectre

lscpu identifierSpectre v2
Setting nameEnforce Spectre Variant 2 Mitigation
Applied parameterspectre_v2=on

Affects Intel CPUs, allowing unauthorized access to data in the L1 cache. Ditana enforces full mitigation with aggressive cache flushing.

The kernel does not by default enforce the disabling of SMT, which leaves SMT systems vulnerable when running untrusted guests with EPT enabled.

kernel.org: L1TF

lscpu identifierL1tf
Setting nameEnforce L1 Terminal Fault Mitigation
Applied parameterl1tf=full,force

Allows attackers to sample data from CPU buffers. Full mitigation may disable SMT if necessary.

The kernel does not by default enforce the disabling of SMT, which leaves SMT systems vulnerable when running untrusted code.

kernel.org: MDS

lscpu identifierMds
Setting nameEnforce MDS Mitigation
Applied parametermds=full,nosmt

Affects CPUs with Transactional Synchronization Extensions. Full mitigation may disable SMT if required.

TSX might be disabled if microcode provides a TSX control MSR. If so, system is not vulnerable.

kernel.org: TAA

lscpu identifierTsx async abort
Setting nameEnforce TSX Async Abort Mitigation
Applied parametertsx_async_abort=full,nosmt

Speculative execution exploit allowing kernel memory reads from userspace. Ditana forces L1 data cache flushing.

The kernel command line allows to control the L1D flush mitigations at boot time with the option l1d_flush=. By default the mechanism is disabled.

kernel.org: L1D flush

lscpu identifierMeltdown
Setting nameEnforce Meltdown Mitigation
Applied parameterl1d_flush=on

Data leakage from memory-mapped I/O. Full mitigation may disable SMT.

full,nosmt — Same as full, with SMT disabled on vulnerable CPUs. This is the complete mitigation.

kernel.org: MMIO stale data

lscpu identifierMmio stale data
Setting nameEnforce MMIO Stale Data Mitigation
Applied parametermmio_stale_data=full,nosmt

Retbleed — Cross-Thread Return Address Predictions

Section titled “Retbleed — Cross-Thread Return Address Predictions”

Speculative execution attack leaking return addresses. Auto-selected mitigation may disable SMT.

auto,nosmt — automatically select a mitigation, disabling SMT if necessary for the full mitigation.

kernel.org: kernel parameters

lscpu identifierRetbleed
Setting nameEnforce Retbleed Mitigation
Applied parameterretbleed=auto,nosmt

See also kernel.org: Cross-Thread Return Address Predictions.

Speculative attacks via the return stack buffer. Combines IBPB barriers with strict spectre_v2-user mode.

‘Mitigation: IBPB’: Similar protection as “safe RET” but employs an IBPB barrier on privilege domain crossings (User→Kernel, Guest→Host).

kernel.org: SRSO

lscpu identifierSpec rstack overflow
Setting nameEnforce SRSO Mitigation
Applied parameterspec_rstack_overflow=ibpb spectre_v2_user=on

Affects AVX instructions. Forces microcode mitigation, or disables AVX where microcode is unavailable.

Specifying gather_data_sampling=force will use the microcode mitigation when available or disable AVX on affected systems where the microcode hasn’t been updated to include the mitigation.

kernel.org: Gather Data Sampling

lscpu identifierGather data sampling
Setting nameEnforce Gather Data Sampling Mitigation
Applied parametergather_data_sampling=force

Allows sampling of data from CPU registers.

This parameter overrides the compile time default set by CONFIG_MITIGATION_RFDS.

kernel.org: kernel parameters

lscpu identifierReg file data sampling
Setting nameEnforce RFDS Mitigation
Applied parameterreg_file_data_sampling=on

See also kernel.org: RFDS.

Vulnerabilities not exposed in the installer

Section titled “Vulnerabilities not exposed in the installer”

The kernel performs maximum mitigation by default for these — there is nothing for Ditana to add.

There is no guarantee that all possible attack vectors for Spectre variant 1 are covered.

kernel.org: Spectre

lscpu identifier: Spectre v1

lscpu identifier: Itlb multihit. See kernel.org: iTLB multihit.

SRBDS — Special Register Buffer Data Sampling

Section titled “SRBDS — Special Register Buffer Data Sampling”

lscpu identifier: Srbds. See kernel.org: SRBDS.

The kernel provides mitigation for such vulnerabilities in various forms.

kernel.org: spec_ctrl

lscpu identifier: Spec store bypass.

The installer also exposes two options that reduce mitigations. These significantly increase your exposure to known CPU vulnerabilities. Use only with a clear, justified reason.

Disables Intel Branch Target Injection mitigation. This kernel parameter is undocumented in the official kernel parameters reference, despite being widely set as default on some distributions without explicit communication.

The primary purpose of BTI mitigation is to defend against speculative execution attacks via Control-flow Enforcement Technology (CET) Shadow Stack — see CET Shadow Stack documentation. Disabling it exposes the system to a class of attacks that are otherwise well-defended.

Disable all mitigations — mitigations=off

Section titled “Disable all mitigations — mitigations=off”

This is stronger than unchecking every individual mitigation in the dialog. With mitigations=off, the kernel skips every mitigation it knows about — including the ones Ditana doesn’t expose because they’re on by default. The performance ceiling rises; the security floor drops, hard.

Only useful for benchmarks, air-gapped systems with full physical control, or environments where you have categorically other defences.

See kernel.org: kernel parameters.

The guidance here is based on the official CPU vulnerability documentation and the kernel command-line parameter reference. Different kernel branches occasionally diverge from these defaults in subtle ways; our testing covers the Ditana-supported kernels, but unusual hardware combinations can produce edge cases.

If you have a workload that benefits from a different default, or if you find a CPU model where Ditana’s detection is incomplete or incorrect: please open a GitHub issue or email [email protected]. The detection logic is data, not code — so improvements are usually a few KDL lines.