From: sashiko-bot@kernel.org
To: Jinvas <jinvas@126.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH net v3 1/1] net/mlx5e: fix NULL pointer dereference in arfs_create_groups()
Date: Wed, 18 Nov 2026 13:54:21 +0000 [thread overview]
Message-ID: <sashiko-outbox-221095@kernel.org> (raw)
In-Reply-To: <20261118134514.1765-2-jinvas@126.com>
> arfs_create_groups() creates up to two flow groups in ft->g[], and
> increments ft->num_groups for each group that was created successfully.
> If creating the second group fails, the error path frees ft->g and sets
> it to NULL, but leaves ft->num_groups at 1.
>
> The only caller, arfs_create_table(), calls mlx5e_destroy_flow_table() on
> the error path, which calls mlx5e_destroy_groups(). The latter walks
> ft->g[] from ft->num_groups - 1 down to 0 and dereferences ft->g[0].
> Since ft->g was freed and set to NULL, this is a NULL pointer
> dereference, and the kernel oopses.
>
> The same error path also leaks the flow group that was created
> successfully before the failure, since ft->g is freed without the group
> being destroyed.
>
> [ ... ]
> The fix has not been tested: the patched kernel was not booted, only the
> original crash was reproduced.
>
> Fixes: 3c6d5189246f ("net/mlx5e: fix a double-free in arfs_create_groups")
> Signed-off-by: Jinvas <jinvas@126.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118134514.1765-1-jinvas@126.com?part=1
next prev parent reply other threads:[~2026-11-18 13:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 13:45 [PATCH net v3 0/1] net/mlx5e: fix NULL pointer dereference in arfs_create_groups() Jinvas
2026-11-18 13:45 ` [PATCH net v3 1/1] " Jinvas
2026-11-18 13:54 ` sashiko-bot [this message]
2026-11-19 11:48 ` Daniel Machon
2026-11-18 14:17 ` [PATCH net v3 0/1] " Tariq Toukan
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=sashiko-outbox-221095@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=jinvas@126.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.