lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 10 Sep 2019 12:21:12 +0200
From:   Claudio Imbrenda <imbrenda@...ux.ibm.com>
To:     Christian Borntraeger <borntraeger@...ibm.com>
Cc:     Igor Mammedov <imammedo@...hat.com>, linux-kernel@...r.kernel.org,
        david@...hat.com, cohuck@...hat.com,
        Janosch Frank <frankja@...ux.ibm.com>
Subject: Re: [PATCH] kvm_s390_vm_start_migration: check dirty_bitmap before
 using it as target for memset()

On Mon, 9 Sep 2019 18:21:47 +0200
Christian Borntraeger <borntraeger@...ibm.com> wrote:

[...]


> > diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> > index f329dcb3f44c..dfba51c9d60c 100644
> > --- a/arch/s390/kvm/kvm-s390.c
> > +++ b/arch/s390/kvm/kvm-s390.c
> > @@ -1018,6 +1018,10 @@ static int
> > kvm_s390_vm_start_migration(struct kvm *kvm) /* mark all the pages
> > in active slots as dirty */ for (slotnr = 0; slotnr <
> > slots->used_slots; slotnr++) { ms = slots->memslots + slotnr;
> > +		if (!ms->dirty_bitmap) {
> > +			WARN(1, "ms->dirty_bitmap == NULL\n");  
> 
> I would prefer to not have a WARN_ON. Otherwise this would allow a
> malicious user to spam the log. 

I agree, the WARN is not needed.
 
> 
> > +			return -EINVAL;
> > +		}
> >  		/*
> >  		 * The second half of the bitmap is only used on
> > x86,
> >  		 * and would be wasted otherwise, so we put it to
> > good 

Otherwise it looks good.



Claudio Imbrenda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ