Commit 1dee968d authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nft_socket: remove WARN_ON_ONCE with huge level value



syzbot managed to reach this WARN_ON_ONCE by passing a huge level
value, remove it.

  WARNING: CPU: 0 PID: 5853 at net/netfilter/nft_socket.c:220 nft_socket_init+0x2f4/0x3d0 net/netfilter/nft_socket.c:220

Reported-by: default avatar <syzbot+a225fea35d7baf8dbdc3@syzkaller.appspotmail.com>
Acked-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent f54186df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -217,7 +217,7 @@ static int nft_socket_init(const struct nft_ctx *ctx,

		level += err;
		/* Implies a giant cgroup tree */
		if (WARN_ON_ONCE(level > 255))
		if (level > 255)
			return -EOPNOTSUPP;

		priv->level = level;