Skip to content

Commit

Permalink
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_re…
Browse files Browse the repository at this point in the history
…sponses()

commit f63c2c2 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jan Beulich authored and Greg Kroah-Hartman committed Jul 7, 2022
1 parent 3ebaa2c commit a74adaf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/xen-netfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,8 +1094,10 @@ static int xennet_get_responses(struct netfront_queue *queue,
}
}
rcu_read_unlock();
next:

__skb_queue_tail(list, skb);

next:
if (!(rx->flags & XEN_NETRXF_more_data))
break;

Expand Down

0 comments on commit a74adaf

Please sign in to comment.