Skip to content

Commit 2e724dc

Browse files
Jon Maloydavem330
authored andcommitted
tipc: eliminate access after delete in group_filter_msg()
KASAN revealed another access after delete in group.c. This time it found that we read the header of a received message after the buffer has been released. Signed-off-by: Jon Maloy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5b5971d commit 2e724dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tipc/group.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ void tipc_group_filter_msg(struct tipc_group *grp, struct sk_buff_head *inputq,
497497
while ((skb = skb_peek(defq))) {
498498
hdr = buf_msg(skb);
499499
mtyp = msg_type(hdr);
500+
blks = msg_blocks(hdr);
500501
deliver = true;
501502
ack = false;
502503
update = false;
@@ -546,7 +547,6 @@ void tipc_group_filter_msg(struct tipc_group *grp, struct sk_buff_head *inputq,
546547
if (!update)
547548
continue;
548549

549-
blks = msg_blocks(hdr);
550550
tipc_group_update_rcv_win(grp, blks, node, port, xmitq);
551551
}
552552
return;

0 commit comments

Comments
 (0)