s390/sclp: fix Secure-IPL facility detection
authorAlexander Egorenkov <egorenar@linux.ibm.com>
Thu, 9 Sep 2021 10:20:56 +0000 (12:20 +0200)
committerDom Cobley <popcornmix@gmail.com>
Thu, 14 Oct 2021 11:32:54 +0000 (12:32 +0100)
commitc44e5330abf110378f497a3ed785554eb701dca8
treed5ba188b0b1b2cb7c8835c1b2756d17fb2fa8e31
parent7c2422f4e35e0bf47970872649aa0a06eec1d413
s390/sclp: fix Secure-IPL facility detection

commit d76b14f3971a0638b6cd0da289f8b48acee287d0 upstream.

Prevent out-of-range access if the returned SCLP SCCB response is smaller
in size than the address of the Secure-IPL flag.

Fixes: c9896acc7851 ("s390/ipl: Provide has_secure sysfs attribute")
Cc: stable@vger.kernel.org # 5.2+
Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/char/sclp_early.c