From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Alok Tiwari <alok.a.tiwari@oracle.com>
Cc: linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 6.1] netfilter: Null pointer dereference in nf_tables_updobj
Date: Tue, 17 Jan 2023 16:27:01 +0100 [thread overview]
Message-ID: <Y8a+RddrpMz7cUdC@salvia> (raw)
In-Reply-To: <Y8at5Le5f4ifFYqk@salvia>
On Tue, Jan 17, 2023 at 03:17:11PM +0100, Pablo Neira Ayuso wrote:
> On Tue, Jan 17, 2023 at 05:45:38AM -0800, Alok Tiwari wrote:
> > static analyzer detect null pointer dereference case for 'type'
> > function __nft_obj_type_get() can return NULL value which require to handle
> > if type is NULL pointer return -ENOENT
>
> This should not ever happen, but it is good to have a failsafe in this
> path.
>
> I'll take this into nf.git, thanks.
BTW, easier to read:
if (WARN_ON_ONCE(!type))
instead of:
if (!WARN_ON_ONCE(type))
I'll mangle the patch here before applying, unless you prefer to send a v2.
prev parent reply other threads:[~2023-01-17 15:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 13:45 [PATCH 6.1] netfilter: Null pointer dereference in nf_tables_updobj Alok Tiwari
2023-01-17 14:17 ` Pablo Neira Ayuso
2023-01-17 15:27 ` Pablo Neira Ayuso [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=Y8a+RddrpMz7cUdC@salvia \
--to=pablo@netfilter.org \
--cc=alok.a.tiwari@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/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.