From: Janosch Frank Date: Fri, 27 Sep 2019 13:33:22 +0000 (+0200) Subject: s390x: sclp: fix error handling for oversize control blocks X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d959f6cf502f37ddda91140a2e7a2e2b72de397e;p=qemu.git s390x: sclp: fix error handling for oversize control blocks Requests over 4k are not a spec exception. Signed-off-by: Janosch Frank Reviewed-by: Jason J. Herne Message-Id: <1569591203-15258-4-git-send-email-imbrenda@linux.ibm.com> Acked-by: David Hildenbrand Signed-off-by: Christian Borntraeger --- diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 73244c938b..abb6e5011f 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -213,8 +213,7 @@ int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code) cpu_physical_memory_read(sccb, &work_sccb, sccb_len); /* Valid sccb sizes */ - if (be16_to_cpu(work_sccb.h.length) < sizeof(SCCBHeader) || - be16_to_cpu(work_sccb.h.length) > SCCB_SIZE) { + if (be16_to_cpu(work_sccb.h.length) < sizeof(SCCBHeader)) { r = -PGM_SPECIFICATION; goto out; }