Skip to content
Snippets Groups Projects
Commit defb7098 authored by Christian A. Ehrhardt's avatar Christian A. Ehrhardt Committed by MST
Browse files

hw/acpi/erst.c: Fix memory handling issues


- Fix memset argument order: The second argument is
  the value, the length goes last.
- Fix an integer overflow reported by Alexander Bulekov.

Both issues allow the guest to overrun the host buffer
allocated for the ERST memory device.

Cc: Eric DeVolder <eric.devolder@oracle.com
Cc: Alexander Bulekov <alxndr@bu.edu>
Cc: qemu-stable@nongnu.org
Fixes: f7e26ffa ("ACPI ERST: support for ACPI ERST feature")
Tested-by: default avatarAlexander Bulekov <alxndr@bu.edu>
Signed-off-by: default avatarChristian A. Ehrhardt <lk@c--e.de>
Message-Id: <20221024154233.1043347-1-lk@c--e.de>
Fixes: #1268


Reviewed-by: default avatarAlexander Bulekov <alxndr@bu.edu>
Reviewed-by: default avatarEric DeVolder <eric.devolder@oracle.com>
Reviewed-by: MST's avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: MST's avatarMichael S. Tsirkin <mst@redhat.com>
parent 0193d693
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment