Skip to contentSkip to conversation

netfilter: nft_socket: remove WARN_ON_ONCE with giant cgroup tree

PATCH In review Pablo Neira Ayuso 2 participants 3 messages Aug 7, 2025

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 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
index 35d0409b0095..36affbb697c2 100644
@@ -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
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Pablo Neira Ayuso

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

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.

author maintainer
#2 lore raw
Quoted 6 lines · Florian Westphal
Quoted 4 lines · Pablo Neira Ayuso

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
Quoted 7 lines

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.

I guess it is both, huge level value and giant cgroup tree.

Anyway, I take this description.

Quoted 3 lines

Patch is correct though.