From: David Carlier <devnexen@gmail.com>
To: netdev@vger.kernel.org
Cc: vburru@marvell.com, sedara@marvell.com, srasheed@marvell.com,
sburla@marvell.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, David Carlier <devnexen@gmail.com>
Subject: [PATCH net v2 0/2] octeon_ep_vf: fix napi_build_skb() NULL dereference
Date: Thu, 9 Apr 2026 19:40:07 +0100 [thread overview]
Message-ID: <20260409184009.930359-1-devnexen@gmail.com> (raw)
napi_build_skb() can return NULL on allocation failure. In
__octep_vf_oq_process_rx(), the result is used directly without a
NULL check in both the single-buffer and multi-fragment paths,
leading to a NULL pointer dereference.
Patch 1 introduces a helper to deduplicate the ring index advance
pattern, patch 2 adds the actual NULL checks.
---
v1 -> v2: split into refactor + fix per Simon Horman review.
v1: https://lore.kernel.org/netdev/Z-6w5kfCJoGhb30g@framework/
David Carlier (2):
octeon_ep_vf: introduce octep_vf_oq_next_idx() helper
octeon_ep_vf: add NULL check for napi_build_skb()
.../marvell/octeon_ep_vf/octep_vf_rx.c | 47 ++++++++++++++-----
1 file changed, 36 insertions(+), 11 deletions(-)
--
2.53.0
next reply other threads:[~2026-04-09 18:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 18:40 David Carlier [this message]
2026-04-09 18:40 ` [PATCH net v2 1/2] octeon_ep_vf: introduce octep_vf_oq_next_idx() helper David Carlier
2026-04-09 18:40 ` [PATCH net v2 2/2] octeon_ep_vf: add NULL check for napi_build_skb() David Carlier
2026-04-13 22:50 ` [PATCH net v2 0/2] octeon_ep_vf: fix napi_build_skb() NULL dereference patchwork-bot+netdevbpf
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=20260409184009.930359-1-devnexen@gmail.com \
--to=devnexen@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sburla@marvell.com \
--cc=sedara@marvell.com \
--cc=srasheed@marvell.com \
--cc=stable@vger.kernel.org \
--cc=vburru@marvell.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 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.