In the Linux kernel, the following vulnerability has been resolved: cpufreq: Hold the policy write lock when changing boost state The per-policy boost sysfs handler calls policy_set_boost() under policy->rwsem, but the global boost handler and cpufreq_online() do not. Consequently, global and per-policy boost changes can concurrently update policy->boost_enabled, invoke the driver callback and update the boost frequency QoS request. The driver callbacks also access policy state, e.g. CPPC updates cpuinfo.max_freq that assumes policy->rw_sem held. Take policy->rwsem around policy_set_boost() in both unlocked callers. Keep locking at the call sites because the per-policy sysfs handler already holds the lock.
https://git.kernel.org/stable/c/e6f50e602e373583423654ec000cad8b8d08f7bc
https://git.kernel.org/stable/c/5a4d0d190f210073e3fed6e876ffcb7cbd677b72
https://git.kernel.org/stable/c/181aee5f26ecc8d5654c2ca43862ef669b044302