Xen Security Advisory 457 v1 - Linux/xen-netback: Memory leak due to missing cleanup function
Subsystems (2)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Xen Security Advisory XSA-457
Linux/xen-netback: Memory leak due to missing cleanup function
ISSUE DESCRIPTION
=================
In netback, xennet_alloc_one_rx_buffer() failed to call the appropriate clean-up function, resulting in a memory leak.
IMPACT
======
A malicious guest userspace process can exhaust memory resources within the guest kernel, potentially leading to a system crash (Denial of Service). It is not known whether it can be triggered remotely.
VULNERABLE SYSTEMS
==================
Systems with guests running Linux 5.9 and later with Xen PV network devices are affected.
MITIGATION
==========
For HVM guests, using emulated network devices will avoid this issue.
RESOLUTION
==========
The following patch in Linux resolves the issue:
https://git.kernel.org/torvalds/c/037965402a010898d34f4e35327d22c0a95cd51f
A copy of which has attached.
xsa457.patch Linux 5.9
$ sha256sum xsa457* 9d6ae3da27f1ff92f9f45c800822beecda603d6dea6726207cee6c768416114c xsa457.patch $
NOTE ON THE LACK OF EMBARGO
===========================
The issue was reported initially on a public bug tracker and fixed in public before it was realized that there was a security aspect. -----BEGIN PGP SIGNATURE-----
iQFABAEBCAAqFiEEI+MiLBRfRHX6gGCng/4UyVfoK9kFAmY6YN8MHHBncEB4ZW4u b3JnAAoJEIP+FMlX6CvZq4kH/0BcaF/4dKqxQ/hYMMoLxcE1kzHn2kAdFPcvxcuu Csk1yLugbvxHgwgp0lI9JjiqzSMt68pN8B9mWbcMBBvA7jGGsJ6Vjp25kQnUToLe FPiAhW/TY+1YXOnhsfn9dHHk1Tv0W5D69QuUuj6zGUvRMdV+WPyA/mGPWnBrJgT+ 5s6tKFxls1JiLdFxuJKqi8Ok8HrX1zE9unSWEUri8SNE2k3h5i29X2v+S8yBv2y0 XBnzr16kL9KKim0sNSErB1QU5BThnDBCFk+7FKAAYGAv5H6N3VLv66DLARCYfPhP iXJU3/+yvAjwZjp5oYtbqHXzdd/m0b/IrF/0ZMLBaoDs0s4=
=vfs6
-----END PGP SIGNATURE-----
From 037965402a010898d34f4e35327d22c0a95cd51f Mon Sep 17 00:00:00 2001
From: Jesper Dangaard Brouer <[email protected]>
Date: Wed, 27 Mar 2024 13:14:56 +0100
Subject: xen-netfront: Add missing skb_mark_for_recycle
Notice that skb_mark_for_recycle() is introduced later than fixes tag in commit 6a5bcd84e886 ("page_pool: Allow drivers to hint on SKB recycling").
It is believed that fixes tag were missing a call to page_pool_release_page() between v5.9 to v5.14, after which is should have used skb_mark_for_recycle(). Since v6.6 the call page_pool_release_page() were removed (in commit 535b9c61bdef ("net: page_pool: hide page_pool_release_page()") and remaining callers converted (in commit 6bfef2ec0172 ("Merge branch 'net-page_pool-remove-page_pool_release_page'")).
This leak became visible in v6.8 via commit dba1b8a7ab68 ("mm/page_pool: catch page_pool memory leaks").
--- drivers/net/xen-netfront.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/xen-netfront.c +1 -0
@@ -285,6 +285,7 @@ static struct sk_buff *xennet_alloc_one_rx_buffer(struct netfront_queue *queue)return NULL ; }skb_add_rx_frag (skb,0 , page,0 ,0 ,PAGE_SIZE ); +skb_mark_for_recycle (skb);/* Align ip header to a 16 bytes boundary */ skb_reserve (skb,NET_IP_ALIGN );
Signature · 1 line
cgit 1.2.3-korg