summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2015-07-15 10:29:38 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-16 20:52:15 -0700
commit37df1cab0c4d4ec0f4bec868b2e26b84e725c478 (patch)
tree6697444423db831b9f88b2501d852839c233d91d /drivers/dma
parentd8246ca4e3ce08c9ed98ebe292f36ee2bc5f54ab (diff)
x86/nmi/64: Use DF to avoid userspace RSP confusing nested NMI detection
commit 810bc075f78ff2c221536eb3008eac6a492dba2d upstream. We have a tricky bug in the nested NMI code: if we see RSP pointing to the NMI stack on NMI entry from kernel mode, we assume that we are executing a nested NMI. This isn't quite true. A malicious userspace program can point RSP at the NMI stack, issue SYSCALL, and arrange for an NMI to happen while RSP is still pointing at the NMI stack. Fix it with a sneaky trick. Set DF in the region of code that the RSP check is intended to detect. IRET will clear DF atomically. ( Note: other than paravirt, there's little need for all this complexity. We could check RIP instead of RSP. ) Signed-off-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Borislav Petkov <bp@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma')
0 files changed, 0 insertions, 0 deletions