On Thu, Mar 24, 2022 at 1:32 AM Davide Gardenal <[email protected]> wrote: > > Upstream patch: > https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00979.html > > CVE: CVE-2020-13791 > > Update v2: rebase with patch for CVE-2020-13253 and > add Upstream-Status in patch description
Thanks for sending v2 In the future if you put the above version change note after the three dashes below it will make life just a little bit easier for me. When it is prior to the dashes I have to hand edit the patch to remove the version notes, otherwise they will end up in the commit message. No big deal either way, I appreciate the help with CVEs! > > Signed-off-by: Davide Gardenal <[email protected]> > --- i.e. put version notes here! > meta/recipes-devtools/qemu/qemu.inc | 1 + > .../qemu/qemu/CVE-2020-13791.patch | 44 +++++++++++++++++++ > 2 files changed, 45 insertions(+) > create mode 100644 meta/recipes-devtools/qemu/qemu/CVE-2020-13791.patch > > diff --git a/meta/recipes-devtools/qemu/qemu.inc > b/meta/recipes-devtools/qemu/qemu.inc > index 0bdc917783..25c2cdef3a 100644 > --- a/meta/recipes-devtools/qemu/qemu.inc > +++ b/meta/recipes-devtools/qemu/qemu.inc > @@ -97,6 +97,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ > file://CVE-2020-13253_3.patch \ > file://CVE-2020-13253_4.patch \ > file://CVE-2020-13253_5.patch \ > + file://CVE-2020-13791.patch \ > " > UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" > > diff --git a/meta/recipes-devtools/qemu/qemu/CVE-2020-13791.patch > b/meta/recipes-devtools/qemu/qemu/CVE-2020-13791.patch > new file mode 100644 > index 0000000000..1e8278f7b7 > --- /dev/null > +++ b/meta/recipes-devtools/qemu/qemu/CVE-2020-13791.patch > @@ -0,0 +1,44 @@ > +Date: Thu, 4 Jun 2020 16:25:24 +0530 > +From: Prasad J Pandit <[email protected]> > +Subject: [PATCH v3] ati-vga: check address before reading > configuration bytes (CVE-2020-13791) > + > +While reading PCI configuration bytes, a guest may send an > +address towards the end of the configuration space. It may lead > +to an OOB access issue. Add check to ensure 'address + size' is > +within PCI configuration space. > + > +CVE: CVE-2020-13791 > + > +Upstream-Status: Submitted > +https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00979.html > + > +Reported-by: Ren Ding <[email protected]> > +Reported-by: Hanqing Zhao <[email protected]> > +Reported-by: Yi Ren <[email protected]> > +Suggested-by: BALATON Zoltan <[email protected]> > +Signed-off-by: Prasad J Pandit <[email protected]> > +Signed-off-by: Davide Gardenal <[email protected]> > +--- > + hw/display/ati.c | 4 +++- > + 1 file changed, 3 insertions(+), 1 deletion(-) > + > +Update v3: avoid modifying 'addr' variable > + -> https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00834.html > + > +diff --git a/hw/display/ati.c b/hw/display/ati.c > +index 67604e68de..b4d0fd88b7 100644 > +--- a/hw/display/ati.c > ++++ b/hw/display/ati.c > +@@ -387,7 +387,9 @@ static uint64_t ati_mm_read(void *opaque, hwaddr addr, > unsigned int size) > + val = s->regs.crtc_pitch; > + break; > + case 0xf00 ... 0xfff: > +- val = pci_default_read_config(&s->dev, addr - 0xf00, size); > ++ if ((addr - 0xf00) + size <= pci_config_size(&s->dev)) { > ++ val = pci_default_read_config(&s->dev, addr - 0xf00, size); > ++ } > + break; > + case CUR_OFFSET: > + val = s->regs.cur_offset; > +-- > +2.26.2 > -- > 2.32.0 > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#163613): https://lists.openembedded.org/g/openembedded-core/message/163613 Mute This Topic: https://lists.openembedded.org/mt/89996991/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
