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: <20201007082437.GV1874917@unreal>
Date:   Wed, 7 Oct 2020 11:24:37 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Johannes Berg <johannes@...solutions.net>
Cc:     David Miller <davem@...emloft.net>, kuba@...nel.org,
        netdev@...r.kernel.org, kernel-team@...com, jiri@...nulli.us,
        andrew@...n.ch, mkubecek@...e.cz,
        Saeed Mahameed <saeedm@...dia.com>
Subject: Re: [PATCH net-next v2 0/7] ethtool: allow dumping policies to user
 space

On Wed, Oct 07, 2020 at 09:30:51AM +0200, Johannes Berg wrote:
> On Wed, 2020-10-07 at 09:27 +0300, Leon Romanovsky wrote:
> >
> > This series and my guess that it comes from ff419afa4310 ("ethtool: trim policy tables")
> > generates the following KASAN out-of-bound error.
>
> Interesting. I guess that is
>
> 	req_info->counts_only = tb[ETHTOOL_A_STRSET_COUNTS_ONLY];
>
> which basically means that before you never actually *use* the
> ETHTOOL_A_STRSET_COUNTS_ONLY flag, but of course it shouldn't be doing
> this ...
>
> Does this fix it?

Yes, it fixed KASAN, but it we got new failure after that.

11:07:51 player_id: 1 shell.py:62 [LinuxEthtoolAgent] DEBUG : running command(/opt/mellanox/ethtool/sbin/ethtool --set-channels eth2 combined 3) with pid: 13409
11:07:51 player_id: 1 protocol.py:605 [OpSetChannels] ERROR : RC:1, STDERR:
netlink error: Unknown attribute type (offset 36)
netlink error: Invalid argument

>
> diff --git a/net/ethtool/netlink.h b/net/ethtool/netlink.h
> index 3f5719786b0f..d8efec516d86 100644
> --- a/net/ethtool/netlink.h
> +++ b/net/ethtool/netlink.h
> @@ -347,7 +347,7 @@ extern const struct ethnl_request_ops ethnl_tsinfo_request_ops;
>
>  extern const struct nla_policy ethnl_header_policy[ETHTOOL_A_HEADER_FLAGS + 1];
>  extern const struct nla_policy ethnl_header_policy_stats[ETHTOOL_A_HEADER_FLAGS + 1];
> -extern const struct nla_policy ethnl_strset_get_policy[ETHTOOL_A_STRSET_STRINGSETS + 1];
> +extern const struct nla_policy ethnl_strset_get_policy[ETHTOOL_A_STRSET_COUNTS_ONLY + 1];
>  extern const struct nla_policy ethnl_linkinfo_get_policy[ETHTOOL_A_LINKINFO_HEADER + 1];
>  extern const struct nla_policy ethnl_linkinfo_set_policy[ETHTOOL_A_LINKINFO_TP_MDIX_CTRL + 1];
>  extern const struct nla_policy ethnl_linkmodes_get_policy[ETHTOOL_A_LINKMODES_HEADER + 1];
> diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c
> index 0734e83c674c..0baad0ce1832 100644
> --- a/net/ethtool/strset.c
> +++ b/net/ethtool/strset.c
> @@ -103,6 +103,7 @@ const struct nla_policy ethnl_strset_get_policy[] = {
>  	[ETHTOOL_A_STRSET_HEADER]	=
>  		NLA_POLICY_NESTED(ethnl_header_policy),
>  	[ETHTOOL_A_STRSET_STRINGSETS]	= { .type = NLA_NESTED },
> +	[ETHTOOL_A_STRSET_COUNTS_ONLY]	= { .type = NLA_FLAG },
>  };
>
>  static const struct nla_policy get_stringset_policy[] = {
>
> johannes
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ