Skip to contentSkip to conversation

x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation

RFC Liran Alon 2 participants 2 messages Jan 26, 2018 KVM

lore
Share & tools
lore

Liran Alon

author
#0 lore raw
Quoted 10 lines · ----- [email protected] wrote:
Quoted 1 line · Liran Alon

It is true that attacker cannot speculate to a kernel-address, but

it

Quoted 2 lines

doesn't mean it cannot use the leaked kernel-address together with another unrelated vulnerability to build a reliable exploit.

The address doesn't leak if you can't execute there. It's the same reason that we don't worry about speculation to user addresses from the
kernel when SMEP is in play.

Maybe I misunderstand BTB & BHB internals. Will be glad if you could pinpoint my error.

Google P0 blog-post (https://googleprojectzero.blogspot.co.il/2018/01/reading-privileged-memory-with-side.html) claims that BTB & BHB only use <31 low bits of the address of the source instruction to lookup into the BTB. In addition, it claims that the higher bits of the predicated destination change together with the higher bits of the source instruction.

Therefore, it should be possible to leak the low bits of high predicition-mode code BTB/BHB entries from low prediction-mode code. Because the predicted destination address will reside in user-space.

What am I missing?

Thanks,
-Liran

#1 lore raw
Quoted 31 lines

-----Original Message-----
From: Liran Alon [mailto:[email protected]]
Sent: Thursday, January 25, 2018 6:50 PM
To: Hansen, Dave <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Mallick, Asit K <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Nakajima, Jun <[email protected]>; [email protected]; Raj, Ashok <[email protected]>; Van De Ven, Arjan <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Williams, Dan J <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [RFC 09/10] x86/enter: Create macros to restrict/unrestrict Indirect Branch Speculation

Google P0 blog-post
(https://googleprojectzero.blogspot.co.il/2018/01/reading-privileged-memory-
with-side.html) claims that BTB & BHB only use <31 low bits of the address of the source instruction to lookup into the BTB. In addition, it claims that the higher bits of the predicated destination change together with the higher bits of the source instruction.

Quoted 5 lines

Therefore, it should be possible to leak the low bits of high predicition-mode code BTB/BHB entries from low prediction-mode code. Because the predicted destination address will reside in user-space.

What am I missing?

I thought this email thread was about the RSB...