Skip to content

Additional CPU Mitigations #17

@raja-grewal

Description

@raja-grewal

Hello,

I was browsing through the currently applied CPU mitigations and noticed that there are perhaps a few additions that could be made that are not already enabled using implicit mitigations=auto by default. Note see Kicksecure/security-misc#199 (comment) and Kicksecure/security-misc#320 for some comments on the flawed reliance on this parameter to do maximum hardening by default.

Currently you explicitly enable the follow:

spec_store_bypass_disable=on
ssbd=force-on
spectre_v2=on
spectre_bhi=on
tsx=off

Using the kernel docs as a guide we can find several others that can be tightened. Additionally, you could also refer to the linked Kicksecure configs where you can find more succinct details (but with SMT disabled) and references regarding each parameter.

Given that you have elected to not disable SMT, I still think there are some further hardening you can apply above the default.

The additional proposed settings to include are the following:

kvm-intel.vmentry_l1d_flush=always
kvm.nx_huge_pages=force
l1d_flush=on
kvm.mitigate_smt_rsb=1
gather_data_sampling=force
indirect_target_selection=force
vmscape=force

Despite obvious expected performance reductions across the board, the only one with the potential to cause more serious issues is gather_data_sampling=force as this will entirely disable use of the AVX instruction set if a suitable microcode update is not also applied.

I look forward to any feedback!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions