linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Branch Target Injection (BTI) gadget in minstrel
@ 2022-10-24 22:57 Pawan Gupta
  2022-10-24 22:57 ` [RFC PATCH 1/2] nospec: Add a generic barrier_nospec() Pawan Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Pawan Gupta @ 2022-10-24 22:57 UTC (permalink / raw)
  To: scott.d.constable, daniel.sneddon, Jakub Kicinski, dave.hansen,
	Johannes Berg, Paolo Abeni, antonio.gomez.iglesias,
	David S. Miller, Eric Dumazet
  Cc: linux-wireless, linux-kernel, x86, gregkh, netdev

Hi,

There is a theoretical possibility of using
minstrel_ht_get_expected_throughput() as a disclosure gadget for Branch
History Injection (BHI)/Intra-mode Branch Target Injection (IMBTI) [1].
Requesting feedback on the couple of patches that mitigates this.

First patch adds a generic speculation barrier. Second patch uses the
speculation barrier to mitigate BHI/IMBTI.

The other goal of this series is to start a discussion on whether such
hard to exploit, but theoretical possible attacks deems to be mitigated.

In general Branch Target Injection class of attacks involves an adversary
controlling an indirect branch target to misspeculate to a disclosure gadget.
For a successful attack an adversary also needs to control the register
contents used by the disclosure gadget.

Assuming preconditions are met, a disclosure gadget would transiently do
below:

  1. Loads an attacker chosen data from memory.
  2. Based on the data, modifies cache state that is observable by an attacker.

Although both these operations are architecturally invisible, the cache state
changes could be used to infer the data.

Disclosure gadget is mitigated by adding a speculation barrier.

Thanks,
Pawan

[1] https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/branch-history-injection.html

Pawan Gupta (2):
  nospec: Add a generic barrier_nospec()
  minstrel_ht: Mitigate BTI gadget minstrel_ht_get_expected_throughput()

 include/linux/nospec.h             | 4 ++++
 net/mac80211/rc80211_minstrel_ht.c | 9 +++++++++
 2 files changed, 13 insertions(+)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-10-26  7:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 22:57 [RFC PATCH 0/2] Branch Target Injection (BTI) gadget in minstrel Pawan Gupta
2022-10-24 22:57 ` [RFC PATCH 1/2] nospec: Add a generic barrier_nospec() Pawan Gupta
2022-10-24 22:57 ` [RFC PATCH 2/2] minstrel_ht: Mitigate BTI gadget minstrel_ht_get_expected_throughput() Pawan Gupta
2022-10-25  7:36   ` Greg KH
2022-10-25 16:55     ` Pawan Gupta
2022-10-25 11:07 ` [RFC PATCH 0/2] Branch Target Injection (BTI) gadget in minstrel Peter Zijlstra
2022-10-25 19:38   ` Pawan Gupta
2022-10-25 19:56     ` Johannes Berg
2022-10-26  0:17       ` Pawan Gupta
2022-10-25 20:31     ` Peter Zijlstra
2022-10-25 22:00   ` Dave Hansen
2022-10-26  7:31     ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).