xen-blkback: don't leak stack data via response ring
authorJan Beulich <jbeulich@suse.com>
Tue, 13 Jun 2017 20:28:27 +0000 (16:28 -0400)
committerSalvatore Bonaccorso <carnil@debian.org>
Sun, 6 Aug 2017 04:24:47 +0000 (05:24 +0100)
commitc5ed2450f084c5efc91e17e63fe458ed13903806
tree570340b5cb20dcf17519b7915756fb653b0b29bd
parent4883e004c5700cb6bf37db4fdaf856e511d3ce24
xen-blkback: don't leak stack data via response ring

Rather than constructing a local structure instance on the stack, fill
the fields directly on the shared ring, just like other backends do.
Build on the fact that all response structure flavors are actually
identical (the old code did make this assumption too).

This is XSA-216.

Cc: stable@vger.kernel.org
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name xen-blkback-don-t-leak-stack-data-via-response-ring.patch
drivers/block/xen-blkback/blkback.c
drivers/block/xen-blkback/common.h