]> git.proxmox.com Git - mirror_qemu.git/commitdiff
s390x: sclp: fix error handling for oversize control blocks
authorJanosch Frank <frankja@linux.ibm.com>
Fri, 27 Sep 2019 13:33:22 +0000 (15:33 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 30 Sep 2019 11:51:50 +0000 (13:51 +0200)
Requests over 4k are not a spec exception.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com>
Message-Id: <1569591203-15258-4-git-send-email-imbrenda@linux.ibm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
hw/s390x/sclp.c

index 73244c938b10068438317275d62fc9ce2e682748..abb6e5011f9cd66ef672dc475fa393f216202ede 100644 (file)
@@ -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;
     }