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]
Message-ID: <5034CF14.5020909@redhat.com>
Date:	Wed, 22 Aug 2012 15:22:44 +0300
From:	Avi Kivity <avi@...hat.com>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] kvm: Fix nonsense handling of compat ioctl

On 08/20/2012 05:43 PM, Alan Cox wrote:
> From: Alan Cox <alan@...ux.intel.com>
> 
> KVM_SET_SIGNAL_MASK passed a NULL argument leaves the on stack signal
> sets uninitialized. It then passes them through to
> kvm_vcpu_ioctl_set_sigmask.
> 
> We should be passing a NULL in this case not translated garbage.
> 
> Signed-off-by: Alan Cox <alan@...ux.intel.com>
> ---
> 
>  virt/kvm/kvm_main.c |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index a2e85af..e47a7ca 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -1975,9 +1975,10 @@ static long kvm_vcpu_compat_ioctl(struct file *filp,
>  			if (copy_from_user(&csigset, sigmask_arg->sigset,
>  					   sizeof csigset))
>  				goto out;
> -		}
> -		sigset_from_compat(&sigset, &csigset);
> -		r = kvm_vcpu_ioctl_set_sigmask(vcpu, &sigset);
> +			sigset_from_compat(&sigset, &csigset);
> +			r = kvm_vcpu_ioctl_set_sigmask(vcpu, &sigset);
> +		} else
> +			kvm_vcpu_ioctl_set_sigmask(vcpu, NULL);
>  		break;
>  	}

Now r is uninitiali[sz]ed.


-- 
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ