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:   Mon, 24 Oct 2022 14:01:31 +0200
From:   Christian Borntraeger <borntraeger@...ux.ibm.com>
To:     "Jason J. Herne" <jjherne@...ux.ibm.com>,
        linux-s390@...r.kernel.org, Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Heiko Carstens <hca@...ux.ibm.com>
Cc:     linux-kernel@...r.kernel.org,
        Alex Williamson <alex.williamson@...hat.com>,
        Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH] s390/vfio-ap: Fix memory allocation for mdev_types array



Am 21.10.22 um 16:59 schrieb Jason J. Herne:
> The vfio-ap crypto driver fails to allocate memory for an array of
> pointers used to pass supported mdev types to mdev_register_parent().
> 
> Since we only support a single mdev type, the fix is to allocate a
> single entry in the ap_matrix_dev->mdev_types array.
> 
> Fixes: 63e685747784 ("s390: vfio-ap: base implementation of VFIO AP device driver")
> Cc: stable@...r.kernel.org
> Cc: Tony Krowiak <akrowiak@...ux.ibm.com>
> Reported-by: Christian Borntraeger <borntraeger@...ux.ibm.com>
> Signed-off-by: Jason J. Herne <jjherne@...ux.ibm.com>
> ---
>   drivers/s390/crypto/vfio_ap_private.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/s390/crypto/vfio_ap_private.h b/drivers/s390/crypto/vfio_ap_private.h
> index 2eddd5f34ed3..976a65f32e7d 100644
> --- a/drivers/s390/crypto/vfio_ap_private.h
> +++ b/drivers/s390/crypto/vfio_ap_private.h
> @@ -52,7 +52,7 @@ struct ap_matrix_dev {
>   	struct mutex guests_lock; /* serializes access to each KVM guest */
>   	struct mdev_parent parent;
>   	struct mdev_type mdev_type;
> -	struct mdev_type *mdev_types[];
> +	struct mdev_type *mdev_types[1];
>   };
>   
>   extern struct ap_matrix_dev *matrix_dev;


Thanks, will go via s390-fixes.

Alex, FYI.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ