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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1845029054.11118038.1507535378802.JavaMail.zimbra@redhat.com>
Date:   Mon, 9 Oct 2017 03:49:38 -0400 (EDT)
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     "Tobin C. Harding" <me@...in.cc>
Cc:     rkrcmar@...hat.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: remove printing of token address



----- Original Message -----
> From: "Tobin C. Harding" <me@...in.cc>
> To: "Paolo Bonzini" <pbonzini@...hat.com>, rkrcmar@...hat.com
> Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org, "Tobin C. Harding" <me@...in.cc>
> Sent: Monday, October 9, 2017 8:30:14 AM
> Subject: [PATCH] KVM: remove printing of token address
> 
> KVM currently prints the address of the consumer token. It is not
> immediately clear what benefit it is to see this address. Printing
> this address leaks kernel pointers into dmesg and is a security risk.
> 
> Remove the consumer token address from error message output.

It should use %pK instead.  Also, please do the same change on the VFIO
side (drivers/vfio/pci/vfio_pci_intrs.c, call to irq_bypass_register_producer).

Thanks,

Paolo

> 
> Signed-off-by: Tobin C. Harding <me@...in.cc>
> ---
>  virt/kvm/eventfd.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> index f2ac53ab8243..b54503ed60bd 100644
> --- a/virt/kvm/eventfd.c
> +++ b/virt/kvm/eventfd.c
> @@ -416,8 +416,7 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
>  		irqfd->consumer.start = kvm_arch_irq_bypass_start;
>  		ret = irq_bypass_register_consumer(&irqfd->consumer);
>  		if (ret)
> -			pr_info("irq bypass consumer (token %p) registration fails: %d\n",
> -				irqfd->consumer.token, ret);
> +			pr_info("irq bypass consumer registration fails: %d\n", ret);
>  	}
>  #endif
>  
> --
> 2.7.4
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ