netfilter: nft_socket: remove WARN_ON_ONCE with giant cgroup tree
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 netfilter: nft_socket: remove WARN_ON_ONCE with giant cgroup tree
syzbot managed to reach this WARN_ON_ONCE with a giant cgroup tree, 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
--- net/netfilter/nft_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nft_socket.c +1 -1
@@ -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;
Signature · 1 line
2.30.2
Quoted 4 lines · Pablo Neira Ayuso
syzbot managed to reach this
WARN_ON_ONCEwith a giant cgroup tree, 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
I looked at the repro and as far as i could see it just passes a large NFTA_SOCKET_LEVEL attribute value.
I'd propose:
syzbot managed to reach this WARN_ON_ONCE by passing a huge level value, remove it.
Patch is correct though.
Pablo Neira Ayuso
maintainerQuoted 6 lines · Florian Westphal
Quoted 4 lines · Pablo Neira Ayuso
syzbot managed to reach this
WARN_ON_ONCEwith a giant cgroup tree, 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
Quoted 7 lines
I looked at the repro and as far as i could see it just passes a large
NFTA_SOCKET_LEVELattribute value.I'd propose:
syzbot managed to reach this
WARN_ON_ONCEby passing a huge level value, remove it.
I guess it is both, huge level value and giant cgroup tree.
Anyway, I take this description.
Quoted 3 lines
Patch is correct though.
Acked-by Florian Westphal <[email protected]>