LWN: Comments on "The "special register buffer data sampling" hardware vulnerability" https://lwn.net/Articles/822595/ This is a special feed containing comments posted to the individual LWN article titled "The "special register buffer data sampling" hardware vulnerability". en-us Sun, 02 Nov 2025 15:40:07 +0000 Sun, 02 Nov 2025 15:40:07 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/824069/ https://lwn.net/Articles/824069/ intgr <div class="FormattedComment"> Does this mitigation have any effect on AMD CPUs that also support RDRAND/RDSEED?<br> <p> </div> Mon, 22 Jun 2020 12:59:53 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822761/ https://lwn.net/Articles/822761/ clopez <div class="FormattedComment"> People that dont trust each other was sharing the same network... and now they share the same CPU (VMs in the "cloud").. so yes<br> </div> Thu, 11 Jun 2020 01:08:10 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822752/ https://lwn.net/Articles/822752/ pbonzini <div class="FormattedComment"> Yes, making the execution deterministic is a good reason to let the hypervisor block the TRNG.<br> <p> In this case it turned out to be a happy accident that the code to mitigate SRBDS from KVM was already implemented, which certainly was a relieve for me compared to ITLB multihit last fall...<br> </div> Wed, 10 Jun 2020 20:32:44 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822751/ https://lwn.net/Articles/822751/ mjg59 <div class="FormattedComment"> I spent a while wondering *why* there's a flag to do this on these specific instructions and the best answer I found was to allow the host to provide the same random numbers to multiple guests in order to allow "best out of three" type validation without having to rewrite code that uses rdrand. Which doesn't seem like a great answer tbf (why not just use a paravirt rng?), but it worked out fortunately for this case.<br> </div> Wed, 10 Jun 2020 20:12:44 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822750/ https://lwn.net/Articles/822750/ pbonzini Yes, exactly. You have to add the <tt>&lt;feature&gt;</tt> XML element inside <tt>&lt;cpu&gt;</tt>; for example: <pre> &lt;cpu mode='host-model'&gt; &lt;feature policy='disable' name='rdrand'/&gt; &lt;feature policy='disable' name='rdseed'/&gt; &lt;/cpu&gt; </pre> Wed, 10 Jun 2020 20:10:26 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822749/ https://lwn.net/Articles/822749/ pbonzini <div class="FormattedComment"> KVM checks whether the features have been hidden, and enables the bits that mjg59 mentioned. It the injects an undefined opcode exception when it gets the vmexit.<br> </div> Wed, 10 Jun 2020 20:03:21 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822748/ https://lwn.net/Articles/822748/ mjg59 <div class="FormattedComment"> There's a flag you can set to trigger a vmexit on rdrand/rdseed<br> </div> Wed, 10 Jun 2020 19:57:58 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822746/ https://lwn.net/Articles/822746/ Cyberax <div class="FormattedComment"> The problem is that clients can run RDRAND even if there are no capability bits set.<br> </div> Wed, 10 Jun 2020 19:48:32 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822743/ https://lwn.net/Articles/822743/ mjg59 <div class="FormattedComment"> Does libvirt have support for this? Presumably the idea is to clear the rdrand/rdseed cpuid capabilities from the guest, and then set the "rdrand exiting" flag so if it uses the instructions anyway it'll trap and you can shut it down?<br> </div> Wed, 10 Jun 2020 19:39:26 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822737/ https://lwn.net/Articles/822737/ pbonzini <div class="FormattedComment"> Split lock detection blocks the whole bus, not just the package. Also you can hide RDRAND and RDSEED from VMs and they will not be able to block the whole package.<br> </div> Wed, 10 Jun 2020 18:49:12 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822731/ https://lwn.net/Articles/822731/ zdzichu <div class="FormattedComment"> We have Zero Trust network. Is this the time for Zero Trust CPUs? Where each core is potentially malicous towards other cores?<br> </div> Wed, 10 Jun 2020 15:49:40 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822727/ https://lwn.net/Articles/822727/ jcm <div class="FormattedComment"> Any time you have uncore shared data readable by multiple cores, you want to be very careful what's in there...<br> </div> Wed, 10 Jun 2020 15:33:48 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822718/ https://lwn.net/Articles/822718/ Paf <div class="FormattedComment"> Ahh, I misunderstood. The referenced serialization and clearing etc are in hardware, and the kernel patches exist solely to control (on, off, etc) the new microcode features. Ok, thanks!<br> </div> Wed, 10 Jun 2020 14:51:30 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822623/ https://lwn.net/Articles/822623/ nivedita76 <div class="FormattedComment"> However, this shouldn't have any overlap with split-lock detection. That is a new feature on yet-to-be-released processors, which presumably will not be vulnerable to SRBDS.<br> </div> Wed, 10 Jun 2020 02:11:14 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822622/ https://lwn.net/Articles/822622/ geofft <div class="FormattedComment"> Here's a writeup of the attack with some more details: <a href="https://www.vusec.net/projects/crosstalk/">https://www.vusec.net/projects/crosstalk/</a><br> <p> The new notable thing about the attack is that the "special registers" are shared across CPU cores, so you can attack one CPU core from another (e.g. an SGX enclave on another core, another customer on the same public cloud hypervisor, etc). Previous attacks required the exploit code to run on the same core as the victim.<br> </div> Wed, 10 Jun 2020 02:06:31 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822620/ https://lwn.net/Articles/822620/ nivedita76 <div class="FormattedComment"> Nope. The mitigation is not by the kernel, it is in microcode. The kernel merely sets a bit in an MSR to tell the microcode to mitigate it.<br> <p> So with mitigation enabled, userspace code can indeed can use RDRAND to lock the memory bus.<br> </div> Wed, 10 Jun 2020 01:50:26 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822619/ https://lwn.net/Articles/822619/ Paf <div class="FormattedComment"> No, I don’t think so - what’s being described here is the kernel usage of the instruction being protected. It’s just a CPU instruction, not a syscall. The kernel cannot and does not take responsibility for protecting user space users of RDRAND. It’s just adding protections to its own usages of the instruction.<br> </div> Wed, 10 Jun 2020 01:15:43 +0000 The "special register buffer data sampling" hardware vulnerability https://lwn.net/Articles/822608/ https://lwn.net/Articles/822608/ cesarb <div class="FormattedComment"> <font class="QuotedText">&gt; Executing RDRAND, RDSEED or EGETKEY will delay memory accesses from other logical processors that miss their core caches, with an impact similar to legacy locked cache-line-split accesses.</font><br> <p> Does this mean that all the work on split lock detection (<a href="https://lwn.net/Articles/790464/">https://lwn.net/Articles/790464/</a> and <a href="https://lwn.net/Articles/806466/">https://lwn.net/Articles/806466/</a>) was for nothing, since even with split lock detection enabled, unprivileged user space can use RDRAND for the same effect?<br> </div> Tue, 09 Jun 2020 20:37:05 +0000