s390/ipl: add missing intersection check to ipl_report handling
stable inclusion from stable-v5.10.176 commit b5e0b3d74285f7b5491e7fa5c3c1e0860f924edf category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I87BGI Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b5e0b3d74285f7b5491e7fa5c3c1e0860f924edf -------------------------------- commit a52e5cdb upstream. The code which handles the ipl report is searching for a free location in memory where it could copy the component and certificate entries to. It checks for intersection between the sections required for the kernel and the component/certificate data area, but fails to check whether the data structures linking these data areas together intersect. This might cause the iplreport copy code to overwrite the iplreport itself. Fix this by adding two addtional intersection checks. Cc: <stable@vger.kernel.org> Fixes: 9641b8cc ("s390/ipl: read IPL report at early boot") Signed-off-by:Sven Schnelle <svens@linux.ibm.com> Reviewed-by:
Vasily Gorbik <gor@linux.ibm.com> Signed-off-by:
Vasily Gorbik <gor@linux.ibm.com> Signed-off-by:
Sven Schnelle <svens@linux.ibm.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment