Skip to content
Commit a1b7f2f6 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Bjorn Helgaas
Browse files

PCI/AER: Avoid info leak in __print_tlp_header()



Commit fab4c256 ("PCI/AER: Add a TLP header print helper") introduced
the helper function __print_tlp_header(), but contrary to the intention,
the behaviour did change: Since we're taking the address of the parameter
t, the first 4 or 8 bytes printed will be the value of the pointer t
itself, and the remaining 12 or 8 bytes will be who-knows-what (something
from the stack).

We want to show the values of the four members of the struct
aer_header_log_regs; that can be done without ugly and error-prone casts.
On little-endian this should produce the same output as originally
intended, and since no-one has complained about getting garbage output so
far, I think big-endian should be ok too.

Fixes: fab4c256 ("PCI/AER: Add a TLP header print helper")
Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarBorislav Petkov <bp@suse.de>
CC: stable@vger.kernel.org	# v3.14+
parent a43f32d6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment