Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
qemu-linux-user.7444
0282-exec-use-qemu_ram_ptr_length-to-acc.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0282-exec-use-qemu_ram_ptr_length-to-acc.patch of Package qemu-linux-user.7444
From 7b3cbaffdae7f0819e242e451c5eb2dbb1dc3f6b Mon Sep 17 00:00:00 2001 From: Prasad J Pandit <pjp@fedoraproject.org> Date: Wed, 12 Jul 2017 18:08:40 +0530 Subject: [PATCH] exec: use qemu_ram_ptr_length to access guest ram When accessing guest's ram block during DMA operation, use 'qemu_ram_ptr_length' to get ram block pointer. It ensures that DMA operation of given length is possible; And avoids any OOB memory access situations. Reported-by: Alex <broscutamaker@gmail.com> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-Id: <20170712123840.29328-1-ppandit@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> (cherry picked from commit 04bf2526ce87f21b32c9acba1c5518708c243ad0) [FL: BSC#1048902 CVE-2017-11334] Signed-off-by: Fei Li <fli@suse.com> --- exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 0d739655c4..4739d091f2 100644 --- a/exec.c +++ b/exec.c @@ -2366,7 +2366,7 @@ bool address_space_rw(AddressSpace *as, hwaddr addr, uint8_t *buf, } else { addr1 += memory_region_get_ram_addr(mr); /* RAM case */ - ptr = qemu_get_ram_ptr(addr1); + ptr = qemu_ram_ptr_length(addr1, &l); memcpy(ptr, buf, l); invalidate_and_set_dirty(addr1, l); } @@ -2400,7 +2400,7 @@ bool address_space_rw(AddressSpace *as, hwaddr addr, uint8_t *buf, } } else { /* RAM case */ - ptr = qemu_get_ram_ptr(mr->ram_addr + addr1); + ptr = qemu_ram_ptr_length(mr->ram_addr + addr1, &l); memcpy(buf, ptr, l); } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor