patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Yunjian Wang <wangyunjian@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Matan Azrad <matan@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	 Michael Baum <michaelba@nvidia.com>,
	"dingxiaoxiong@huawei.com" <dingxiaoxiong@huawei.com>,
	"xudingke@huawei.com" <xudingke@huawei.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: RE: [dpdk-dev] [PATCH 1/1] net/mlx5: fix stack buffer overflow of hrxq's rss_key
Date: Mon, 20 Jun 2022 08:02:30 +0000	[thread overview]
Message-ID: <BYAPR12MB307819CDAB9F0D8CC07B0E5FCFB09@BYAPR12MB3078.namprd12.prod.outlook.com> (raw)
In-Reply-To: <5cd9086411342c7475e3227249d3aa3a3144897d.1640314881.git.wangyunjian@huawei.com>

Hi,

> -----Original Message-----
> From: Yunjian Wang <wangyunjian@huawei.com>
> Sent: Friday, December 24, 2021 5:06 AM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Michael Baum <michaelba@nvidia.com>;
> dingxiaoxiong@huawei.com; xudingke@huawei.com; Yunjian Wang
> <wangyunjian@huawei.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 1/1] net/mlx5: fix stack buffer overflow of hrxq's
> rss_key
> 
> The mlx5_drop_action_create function use mlx5_malloc for allocating
> 'hrxq', but don't allocate for 'rss_key'. This is wrong and it can
> cause buffer overflow.
> 
> Detected with address sanitizer:
> 0 (/usr/lib64/libasan.so.4+0x7b8e2)
> 1 in mlx5_devx_tir_attr_set ../drivers/net/mlx5/mlx5_devx.c:765
> 2 in mlx5_devx_hrxq_new ../drivers/net/mlx5/mlx5_devx.c:800
> 3 in mlx5_devx_drop_action_create ../drivers/net/mlx5/mlx5_devx.c:1051
> 4 in mlx5_drop_action_create ../drivers/net/mlx5/mlx5_rxq.c:2846
> 5 in mlx5_dev_spawn ../drivers/net/mlx5/linux/mlx5_os.c:1743
> 6 in mlx5_os_pci_probe_pf ../drivers/net/mlx5/linux/mlx5_os.c:2501
> 7 in mlx5_os_pci_probe ../drivers/net/mlx5/linux/mlx5_os.c:2647
> 8 in mlx5_os_net_probe ../drivers/net/mlx5/linux/mlx5_os.c:2722
> 9 in drivers_probe ../drivers/common/mlx5/mlx5_common.c:657
> 10 in mlx5_common_dev_probe
> ../drivers/common/mlx5/mlx5_common.c:711
> 11 in mlx5_common_pci_probe
> ../drivers/common/mlx5/mlx5_common_pci.c:150
> 12 in rte_pci_probe_one_driver ../drivers/bus/pci/pci_common.c:269
> 13 in pci_probe_all_drivers ../drivers/bus/pci/pci_common.c:353
> 14 in pci_probe ../drivers/bus/pci/pci_common.c:380
> 15 in rte_bus_probe ../lib/eal/common/eal_common_bus.c:72
> 16 in rte_eal_init ../lib/eal/linux/eal.c:1286
> 17 in main ../app/test-pmd/testpmd.c:4112
> 
> Fixes: 0c762e81da9b ("net/mlx5: share Rx queue drop action code")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      parent reply	other threads:[~2022-06-20  8:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  3:06 Yunjian Wang
2022-01-28  9:41 ` wangyunjian
2022-02-08 10:55 ` wangyunjian
2022-03-02 10:54   ` wangyunjian
2022-06-20  5:16     ` Slava Ovsiienko
2022-06-20  5:59       ` wangyunjian
2022-06-20  8:02 ` Raslan Darawsheh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR12MB307819CDAB9F0D8CC07B0E5FCFB09@BYAPR12MB3078.namprd12.prod.outlook.com \
    --to=rasland@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dingxiaoxiong@huawei.com \
    --cc=matan@nvidia.com \
    --cc=michaelba@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@nvidia.com \
    --cc=wangyunjian@huawei.com \
    --cc=xudingke@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).