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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+sq2Ce0yA1Deh=q_Ne0qNGebwmGOfnMmV75_foKxbXnPnXOwA@mail.gmail.com>
Date:   Wed, 12 May 2021 15:54:28 +0530
From:   Sunil Kovvuri <sunil.kovvuri@...il.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Sunil Goutham <sgoutham@...vell.com>,
        Geetha sowjanya <gakula@...vell.com>,
        Subbaraya Sundeep <sbhatta@...vell.com>,
        hariprasad <hkelam@...vell.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Linux Netdev List <netdev@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net] octeontx2-pf: fix a buffer overflow in otx2_set_rxfh_context()

On Wed, May 12, 2021 at 3:42 PM Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> This function is called from ethtool_set_rxfh() and "*rss_context"
> comes from the user.  Add some bounds checking to prevent memory
> corruption.
>
> Fixes: 81a4362016e7 ("octeontx2-pf: Add RSS multi group support")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> index f4962a97a075..9d9a2e438acf 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> @@ -786,6 +786,10 @@ static int otx2_set_rxfh_context(struct net_device *dev, const u32 *indir,
>         if (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)
>                 return -EOPNOTSUPP;
>
> +       if (*rss_context != ETH_RXFH_CONTEXT_ALLOC &&
> +           *rss_context >= MAX_RSS_GROUPS)
> +               return -EINVAL;
> +
>         rss = &pfvf->hw.rss_info;
>
>         if (!rss->enable) {
> --
> 2.30.2
>

Acked-by: Sunil Goutham <sgoutham@...vell.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ