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: <2023072650-flight-reshuffle-65a0@gregkh>
Date:   Wed, 26 Jul 2023 21:27:55 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Dragos Tatulea <dtatulea@...dia.com>
Cc:     "Michael S . Tsirkin" <mst@...hat.com>, Lin Ma <linma@....edu.cn>,
        Jason Wang <jasowang@...hat.com>,
        Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
        Parav Pandit <parav@...dia.com>,
        virtualization@...ts.linux-foundation.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH 2/2] vdpa: Enable strict validation for netlinks ops

On Wed, Jul 26, 2023 at 09:49:44PM +0300, Dragos Tatulea wrote:
> The previous patch added the missing nla policies that were required for
> validation to work.
> 
> Now strict validation on netlink ops can be enabled. This patch does it.
> 
> Signed-off-by: Dragos Tatulea <dtatulea@...dia.com>
> ---
>  drivers/vdpa/vdpa.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
> index f2f654fd84e5..a7612e0783b3 100644
> --- a/drivers/vdpa/vdpa.c
> +++ b/drivers/vdpa/vdpa.c
> @@ -1257,37 +1257,31 @@ static const struct nla_policy vdpa_nl_policy[VDPA_ATTR_MAX + 1] = {
>  static const struct genl_ops vdpa_nl_ops[] = {
>  	{
>  		.cmd = VDPA_CMD_MGMTDEV_GET,
> -		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = vdpa_nl_cmd_mgmtdev_get_doit,
>  		.dumpit = vdpa_nl_cmd_mgmtdev_get_dumpit,
>  	},
>  	{
>  		.cmd = VDPA_CMD_DEV_NEW,
> -		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = vdpa_nl_cmd_dev_add_set_doit,
>  		.flags = GENL_ADMIN_PERM,
>  	},
>  	{
>  		.cmd = VDPA_CMD_DEV_DEL,
> -		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = vdpa_nl_cmd_dev_del_set_doit,
>  		.flags = GENL_ADMIN_PERM,
>  	},
>  	{
>  		.cmd = VDPA_CMD_DEV_GET,
> -		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = vdpa_nl_cmd_dev_get_doit,
>  		.dumpit = vdpa_nl_cmd_dev_get_dumpit,
>  	},
>  	{
>  		.cmd = VDPA_CMD_DEV_CONFIG_GET,
> -		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = vdpa_nl_cmd_dev_config_get_doit,
>  		.dumpit = vdpa_nl_cmd_dev_config_get_dumpit,
>  	},
>  	{
>  		.cmd = VDPA_CMD_DEV_VSTATS_GET,
> -		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
>  		.doit = vdpa_nl_cmd_dev_stats_get_doit,
>  		.flags = GENL_ADMIN_PERM,
>  	},
> -- 
> 2.41.0
> 

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ