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:   Thu, 9 Jun 2022 19:57:21 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Julian Vetter <jvetter@...rayinc.com>
Cc:     linux-kernel@...r.kernel.org, ysionneau@...rayinc.com
Subject: Re: [PATCH 2/2] msi: Add sanity check if more than MAX_DEV_MSIS MSIs
 are requested

On Thu, Jun 09, 2022 at 05:38:43PM +0200, Julian Vetter wrote:
> If a device requests more than MAX_DEV_MSIS the MSI index will collide with
> the devid and might cause Linux to compute twice the same virtual interrupt
> number for two different devices.
> 
> Signed-off-by: Julian Vetter <jvetter@...rayinc.com>
> Reviewed-by: Yann Sionneau <ysionneau@...rayinc.com>
> ---
>  drivers/base/platform-msi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/base/platform-msi.c b/drivers/base/platform-msi.c
> index 4b0b2fe3a7ff..627d8f6b83ea 100644
> --- a/drivers/base/platform-msi.c
> +++ b/drivers/base/platform-msi.c
> @@ -40,6 +40,8 @@ static irq_hw_number_t platform_msi_calc_hwirq(struct msi_desc *desc)
>  {
>  	u32 devid = desc->dev->msi.data->platform_data->devid;
>  
> +	WARN_ON(desc->msi_index >= MAX_DEV_MSIS);

So you just caused a system to reboot if you have panic-on-warn?  What
is someone supposed to do if this is ever hit?  Why can't you handle it
as an error and properly recover instead of just ignoring it?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ