Skip to content

Commit 48a5fe3

Browse files
1sealkuba-moo
authored andcommitted
tipc: fix bc_ackers underflow on duplicate GRP_ACK_MSG
The GRP_ACK_MSG handler in tipc_group_proto_rcv() currently decrements bc_ackers on every inbound group ACK, even when the same member has already acknowledged the current broadcast round. Because bc_ackers is a u16, a duplicate ACK received after the last legitimate ACK wraps the counter to 65535. Once wrapped, tipc_group_bc_cong() keeps reporting congestion and later group broadcasts on the affected socket stay blocked until the group is recreated. Fix this by ignoring duplicate or stale ACKs before touching bc_acked or bc_ackers. This makes repeated GRP_ACK_MSG handling idempotent and prevents the underflow path. Fixes: 2f48771 ("tipc: guarantee that group broadcast doesn't bypass group unicast") Cc: stable@vger.kernel.org Signed-off-by: Oleh Konko <security@1seal.org> Reviewed-by: Tung Nguyen <tung.quang.nguyen@est.tech> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/41a4833f368641218e444fdcff822039.security@1seal.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 7b735ef commit 48a5fe3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

net/tipc/group.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ void tipc_group_proto_rcv(struct tipc_group *grp, bool *usr_wakeup,
746746
u32 port = msg_origport(hdr);
747747
struct tipc_member *m, *pm;
748748
u16 remitted, in_flight;
749+
u16 acked;
749750

750751
if (!grp)
751752
return;
@@ -798,7 +799,10 @@ void tipc_group_proto_rcv(struct tipc_group *grp, bool *usr_wakeup,
798799
case GRP_ACK_MSG:
799800
if (!m)
800801
return;
801-
m->bc_acked = msg_grp_bc_acked(hdr);
802+
acked = msg_grp_bc_acked(hdr);
803+
if (less_eq(acked, m->bc_acked))
804+
return;
805+
m->bc_acked = acked;
802806
if (--grp->bc_ackers)
803807
return;
804808
list_del_init(&m->small_win);

0 commit comments

Comments
 (0)