Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59560a38 authored by Tomasz Bursztyka's avatar Tomasz Bursztyka Committed by Pablo Neira Ayuso
Browse files

netfilter: nfnetlink: check callbacks before using those in nfnetlink_rcv_msg



nfnetlink_rcv_msg() might call a NULL callback which will cause NULL pointer
dereference.

Signed-off-by: default avatarTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent be0593c6
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -184,9 +184,11 @@ replay:
					lockdep_is_held(&nfnl_mutex)) != ss ||
			    nfnetlink_find_client(type, ss) != nc)
				err = -EAGAIN;
			else
			else if (nc->call)
				err = nc->call(net->nfnl, skb, nlh,
						   (const struct nlattr **)cda);
			else
				err = -EINVAL;
			nfnl_unlock();
		}
		if (err == -EAGAIN)