lkml.org 
[lkml]   [2023]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6.1] netfilter: Null pointer dereference in nf_tables_updobj
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.

\
 
 \ /
  Last update: 2023-03-26 23:44    [W:0.095 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site