]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_tables: NULL pointer dereference in nf_tables_updobj()
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Tue, 17 Jan 2023 15:45:49 +0000 (07:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:51 +0000 (09:33 +0100)
commit647a4f8bf94ffda2719776fdff92c374d87b9f00
tree88d701ea89f1cf462b303401a40c3aef7d8a0849
parente1fa89275e30bbbea484fc7c3c1efb24fd13a192
netfilter: nf_tables: NULL pointer dereference in nf_tables_updobj()

[ Upstream commit 531a33f0862baaecdc0dce6ff55ab93a8912eb3e ]

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 is a theoretical issue, since an existing object has a type, but
better add this failsafe check.

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c