History

xen/netfront: fix leaking data in shared pages

When allocating pages to be used for shared communication with the backend always zero them, this avoids leaking unintended data present on the pages. This is CVE-2022-33740, part of XSA-403.

Roger Pau Monne committed 4 years ago

Commit 307c8de1 parent 2f446ff1 file · +2 −1Browse files

Unified · Split

drivers/net/xen-netfront.c+2−1
@@ -271,7 +271,8 @@ static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue) · 270 unmodified lines
271 if (unlikely(!skb))271 if (unlikely(!skb))
272 return NULL;272 return NULL;
273 273
274 page = page_pool_dev_alloc_pages(queue->page_pool);274 page = page_pool_alloc_pages(queue->page_pool,
275 GFP_ATOMIC | __GFP_NOWARN | __GFP_ZERO);
275 if (unlikely(!page)) {276 if (unlikely(!page)) {
276 kfree_skb(skb);277 kfree_skb(skb);
277 return NULL;278 return NULL;