Skip to content

Commit f63c2c2

Browse files
jbeulichjgross1
authored andcommitted
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses()
The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not be freed (it may be retained for later processing via xennet_move_rx_slot(), or it may simply be unsafe to have it freed). This is CVE-2022-33743 / XSA-405. Fixes: 6c5aa6f ("xen networking: add basic XDP support for xen-netfront") Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com>
1 parent 2400617 commit f63c2c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/xen-netfront.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,8 +1092,10 @@ static int xennet_get_responses(struct netfront_queue *queue,
10921092
}
10931093
}
10941094
rcu_read_unlock();
1095-
next:
1095+
10961096
__skb_queue_tail(list, skb);
1097+
1098+
next:
10971099
if (!(rx->flags & XEN_NETRXF_more_data))
10981100
break;
10991101

0 commit comments

Comments
 (0)