* [PULL 1/4] io: fix busy-wait when uncorking
2026-12-04 13:05 [PULL for-11.2 0/4] Misc fixes patches Daniel P. Berrangé
@ 2026-12-04 13:05 ` Daniel P. Berrangé
2026-12-04 15:47 ` Eric Blake
2026-12-04 13:05 ` [PULL 2/4] io: fix EOF check in websocket decoding code Daniel P. Berrangé
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-12-04 13:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Daniel P. Berrangé, Eric Blake, Marc-André Lureau
If we have corked data pending on the TLS channel, when uncorking
if we don't make progress sending any data, the code currently
busy-waits as it mistakenly expects QCRYPTO_TLS_SESSION_ERR_BLOCK.
This return value is never set by the uncork method, as that will
always return the amount of outstanding data. IOW, to detect this
situation we need to look for the amount of corked data being
unchanged.
The busy-waiting would allow a lesser privileged, but none the less
authenticated & authorized, network client to create a denial of
service attack on the whole VM which can be owned by a user with
high privileges.
Fixes: https://gitlab.com/qemu-project/qemu/-/work_items/5027
Fixes: CVE-2026-141376
Fixes: 99a8b5a0 ("io: cork TLW writes to avoid small TLS records", v11.2.0-rc0)
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
io/channel-tls.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/io/channel-tls.c b/io/channel-tls.c
index 5b0524e68dd..05e89dfed72 100644
--- a/io/channel-tls.c
+++ b/io/channel-tls.c
@@ -462,14 +462,14 @@ static ssize_t qio_channel_tls_writev(QIOChannel *ioc,
*/
while (tioc->corked) {
ssize_t ret = qcrypto_tls_session_write_uncork(tioc->session, errp);
- if (ret == QCRYPTO_TLS_SESSION_ERR_BLOCK) {
+ if (ret < 0) {
+ return -1;
+ } else if (ret == tioc->corked) {
if (done) {
return done;
} else {
return QIO_CHANNEL_ERR_BLOCK;
}
- } else if (ret < 0) {
- return -1;
}
done += (tioc->corked - ret);
tioc->corked = ret;
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PULL 2/4] io: fix EOF check in websocket decoding code
2026-12-04 13:05 [PULL for-11.2 0/4] Misc fixes patches Daniel P. Berrangé
2026-12-04 13:05 ` [PULL 1/4] io: fix busy-wait when uncorking Daniel P. Berrangé
@ 2026-12-04 13:05 ` Daniel P. Berrangé
2026-12-04 13:05 ` [PULL 3/4] tests/functional: update to newer sunxi kernels again Daniel P. Berrangé
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-12-04 13:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Daniel P. Berrangé, Eric Blake, Marc-André Lureau
qio_channel_websock_read_wire() will only mark the channel as
having hit EOF if the underlying channel reports EOF, and there
is no encoded data pending.
This is incorrect behaviour because 'encinput' may contain
cached data from a previous read off the wire, which is none the
less too short to allow a new websocket frame to be decoded
into 'rawinput'.
In this situation, if there is a watch on G_IO_IN, the code will
busy-wait repeatedly getting EOF from the underlying channel but
not reporting EOF upwards due to undecoded 'encinput'
To correctly handle this, when seeing EOF from the underlying
stream, only bubble it upwards if we failed to decode any
additional frames.
Fixes: https://gitlab.com/qemu-project/qemu/-/work_items/5030
Fixes: CVE-2026-141286
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
io/channel-websock.c | 50 +++++++++++++++++++++++++++++++++++++++-----
1 file changed, 45 insertions(+), 5 deletions(-)
diff --git a/io/channel-websock.c b/io/channel-websock.c
index 646cd45be2a..5f672c5899c 100644
--- a/io/channel-websock.c
+++ b/io/channel-websock.c
@@ -965,10 +965,28 @@ static void qio_channel_websock_finalize(Object *obj)
}
+/*
+ * Called when either:
+ * - rawinput is empty and an read operation wants
+ * to decode more data
+ * - something has a watch on G_IO_IN and wants
+ * to know if decoded data is available
+ *
+ * At start of the call encinput may contain data
+ * previously read off the wire during the handshake
+ * that can be immediately decoded without reading
+ * more data, or incomplete frames that could not
+ * be decoded by a previous call.
+ *
+ * Returns: 1 if bytes were read, 0 on eof, -1 on error,
+ * QIO_CHANNEL_ERR_BLOCK on blocking
+ */
static ssize_t qio_channel_websock_read_wire(QIOChannelWebsock *ioc,
Error **errp)
{
+ ssize_t avail;
ssize_t ret;
+ bool eof = false;
if (ioc->encinput.offset < 4096 &&
ioc->rawinput.offset < QIO_CHANNEL_WEBSOCK_MAX_BUFFER) {
@@ -980,29 +998,51 @@ static ssize_t qio_channel_websock_read_wire(QIOChannelWebsock *ioc,
ioc->encinput.offset,
want,
errp);
- if (ret < 0) {
+ if (ret == -1) {
return ret;
}
- if (ret == 0 && ioc->encinput.offset == 0) {
- ioc->io_eof = TRUE;
- return 0;
+ if (ret == 0) {
+ eof = true;
+ }
+ if (ret != QIO_CHANNEL_ERR_BLOCK) {
+ ioc->encinput.offset += ret;
}
- ioc->encinput.offset += ret;
}
+ avail = ioc->rawinput.offset;
while (ioc->encinput.offset != 0) {
if (ioc->payload_remain == 0) {
ret = qio_channel_websock_decode_header(ioc, errp);
+ if (ret == QIO_CHANNEL_ERR_BLOCK) {
+ break;
+ }
if (ret < 0) {
return ret;
}
}
ret = qio_channel_websock_decode_payload(ioc, errp);
+ if (ret == QIO_CHANNEL_ERR_BLOCK) {
+ break;
+ }
if (ret < 0) {
return ret;
}
}
+
+ /*
+ * If we didn't make progress, then we either have
+ * to report EOF, or indicate the read would block
+ */
+ if (ioc->rawinput.offset == avail) {
+ if (eof) {
+ ioc->io_eof = TRUE;
+ return 0;
+ } else {
+ return QIO_CHANNEL_ERR_BLOCK;
+ }
+ }
+
return 1;
}
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PULL 3/4] tests/functional: update to newer sunxi kernels again
2026-12-04 13:05 [PULL for-11.2 0/4] Misc fixes patches Daniel P. Berrangé
2026-12-04 13:05 ` [PULL 1/4] io: fix busy-wait when uncorking Daniel P. Berrangé
2026-12-04 13:05 ` [PULL 2/4] io: fix EOF check in websocket decoding code Daniel P. Berrangé
@ 2026-12-04 13:05 ` Daniel P. Berrangé
2026-12-04 13:05 ` [PULL 4/4] hw/virtio: don't mark virtio-crypto as secure Daniel P. Berrangé
2026-12-04 19:31 ` [PULL for-11.2 0/4] Misc fixes patches Richard Henderson
4 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-12-04 13:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Daniel P. Berrangé, Thomas Huth, Alex Bennée
The recent update to 6.6.44 kernels did not survive long, before
armbian purged that version from their download site.
Update to the newer 6.18.65 version that is the newest version
published which has 'linux-image-current' kernels for sunxi.
The newer kernels do not detect a gmac device, possibly due to
the driver being disabled.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
tests/functional/arm/test_bpim2u.py | 26 ++++++++++++++-----------
tests/functional/arm/test_cubieboard.py | 16 +++++++--------
tests/functional/arm/test_orangepi.py | 20 +++++++++----------
tests/functional/arm/test_replay.py | 12 ++++++------
4 files changed, 39 insertions(+), 35 deletions(-)
diff --git a/tests/functional/arm/test_bpim2u.py b/tests/functional/arm/test_bpim2u.py
index e6fd80ae9d0..69cb3e6f31f 100755
--- a/tests/functional/arm/test_bpim2u.py
+++ b/tests/functional/arm/test_bpim2u.py
@@ -10,14 +10,16 @@
from qemu_test import skipBigDataTest
from qemu_test.utils import image_pow2ceil_expand
+from unittest import skip
+
class BananaPiMachine(LinuxKernelTest):
ASSET_DEB = Asset(
- ('https://apt.armbian.com/pool/main/l/linux-6.6.44/'
- 'linux-image-current-sunxi_24.8.2_armhf__6.6.44-'
- 'S7213-D53de-P4ceb-C697eH5c21-HK01ba-V014b-B58e9-R448a.deb'),
- 'd960131bed01a8bf48882ff133a37826dfdce84138f9a82e0bea331ba795fe78')
+ ('https://apt.armbian.com/pool/main/l/linux-6.18.65/'
+ 'linux-image-current-sunxi_26.11.4_armhf__6.18.65-'
+ 'S4700-D7c7d-P2865-C70ca-H4b9e-HKff8b-V014b-Bdf9b-CVEfee3-R448a.deb'),
+ '2884801a24fa8da60b8ee07ec7650c1cc73571a4013c0bf4a986c136bd077715')
ASSET_INITRD = Asset(
('https://github.com/groeck/linux-build-test/raw/'
@@ -38,8 +40,8 @@ class BananaPiMachine(LinuxKernelTest):
def test_arm_bpim2u(self):
self.set_machine('bpim2u')
kernel_path = self.archive_extract(
- self.ASSET_DEB, member='boot/vmlinuz-6.6.44-current-sunxi')
- dtb_path = ('usr/lib/linux-image-6.6.44-current-sunxi/'
+ self.ASSET_DEB, member='boot/vmlinuz-6.18.65-current-sunxi')
+ dtb_path = ('usr/lib/linux-image-6.18.65-current-sunxi/'
'sun8i-r40-bananapi-m2-ultra.dtb')
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
@@ -57,8 +59,8 @@ def test_arm_bpim2u(self):
def test_arm_bpim2u_initrd(self):
self.set_machine('bpim2u')
kernel_path = self.archive_extract(
- self.ASSET_DEB, member='boot/vmlinuz-6.6.44-current-sunxi')
- dtb_path = ('usr/lib/linux-image-6.6.44-current-sunxi/'
+ self.ASSET_DEB, member='boot/vmlinuz-6.18.65-current-sunxi')
+ dtb_path = ('usr/lib/linux-image-6.18.65-current-sunxi/'
'sun8i-r40-bananapi-m2-ultra.dtb')
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
initrd_path = self.uncompress(self.ASSET_INITRD)
@@ -84,14 +86,15 @@ def test_arm_bpim2u_initrd(self):
# Wait for VM to shut down gracefully
self.vm.wait()
+ @skip("latest armbian sunxi kernels appear to be missing gmac driver")
def test_arm_bpim2u_gmac(self):
self.set_machine('bpim2u')
self.require_netdev('user')
deb_path = self.ASSET_DEB.fetch()
kernel_path = self.archive_extract(
- self.ASSET_DEB, member='boot/vmlinuz-6.6.44-current-sunxi')
- dtb_path = ('usr/lib/linux-image-6.6.44-current-sunxi/'
+ self.ASSET_DEB, member='boot/vmlinuz-6.18.65-current-sunxi')
+ dtb_path = ('usr/lib/linux-image-6.18.65-current-sunxi/'
'sun8i-r40-bananapi-m2-ultra.dtb')
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
rootfs_path = self.uncompress(self.ASSET_ROOTFS)
@@ -118,7 +121,8 @@ def test_arm_bpim2u_gmac(self):
exec_command_and_wait_for_pattern(self, 'cat /proc/partitions',
'mmcblk')
exec_command_and_wait_for_pattern(self, 'ifconfig eth0 up',
- 'eth0: Link is Up')
+ 'eth0: Link is Up',
+ 'No such device')
exec_command_and_wait_for_pattern(self, 'udhcpc eth0',
'udhcpc: lease of 10.0.2.15 obtained')
exec_command_and_wait_for_pattern(self, 'ping -c 3 10.0.2.2',
diff --git a/tests/functional/arm/test_cubieboard.py b/tests/functional/arm/test_cubieboard.py
index eeafc26f90d..83c654ad959 100755
--- a/tests/functional/arm/test_cubieboard.py
+++ b/tests/functional/arm/test_cubieboard.py
@@ -13,10 +13,10 @@
class CubieboardMachine(LinuxKernelTest):
ASSET_DEB = Asset(
- ('https://apt.armbian.com/pool/main/l/linux-6.6.44/'
- 'linux-image-current-sunxi_24.8.2_armhf__6.6.44-'
- 'S7213-D53de-P4ceb-C697eH5c21-HK01ba-V014b-B58e9-R448a.deb'),
- 'd960131bed01a8bf48882ff133a37826dfdce84138f9a82e0bea331ba795fe78')
+ ('https://apt.armbian.com/pool/main/l/linux-6.18.65/'
+ 'linux-image-current-sunxi_26.11.4_armhf__6.18.65-'
+ 'S4700-D7c7d-P2865-C70ca-H4b9e-HKff8b-V014b-Bdf9b-CVEfee3-R448a.deb'),
+ '2884801a24fa8da60b8ee07ec7650c1cc73571a4013c0bf4a986c136bd077715')
ASSET_INITRD = Asset(
('https://github.com/groeck/linux-build-test/raw/'
@@ -38,8 +38,8 @@ class CubieboardMachine(LinuxKernelTest):
def test_arm_cubieboard_initrd(self):
self.set_machine('cubieboard')
kernel_path = self.archive_extract(
- self.ASSET_DEB, member='boot/vmlinuz-6.6.44-current-sunxi')
- dtb_path = ('usr/lib/linux-image-6.6.44-current-sunxi/' +
+ self.ASSET_DEB, member='boot/vmlinuz-6.18.65-current-sunxi')
+ dtb_path = ('usr/lib/linux-image-6.18.65-current-sunxi/' +
'sun4i-a10-cubieboard.dtb')
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
initrd_path = self.uncompress(self.ASSET_INITRD)
@@ -69,8 +69,8 @@ def test_arm_cubieboard_initrd(self):
def test_arm_cubieboard_sata(self):
self.set_machine('cubieboard')
kernel_path = self.archive_extract(
- self.ASSET_DEB, member='boot/vmlinuz-6.6.44-current-sunxi')
- dtb_path = ('usr/lib/linux-image-6.6.44-current-sunxi/' +
+ self.ASSET_DEB, member='boot/vmlinuz-6.18.65-current-sunxi')
+ dtb_path = ('usr/lib/linux-image-6.18.65-current-sunxi/' +
'sun4i-a10-cubieboard.dtb')
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
diff --git a/tests/functional/arm/test_orangepi.py b/tests/functional/arm/test_orangepi.py
index c9cfdbd67aa..2c690a9dcf0 100755
--- a/tests/functional/arm/test_orangepi.py
+++ b/tests/functional/arm/test_orangepi.py
@@ -16,10 +16,10 @@
class OrangePiMachine(LinuxKernelTest):
ASSET_DEB = Asset(
- ('https://apt.armbian.com/pool/main/l/linux-6.6.44/'
- 'linux-image-current-sunxi_24.8.2_armhf__6.6.44-'
- 'S7213-D53de-P4ceb-C697eH5c21-HK01ba-V014b-B58e9-R448a.deb'),
- 'd960131bed01a8bf48882ff133a37826dfdce84138f9a82e0bea331ba795fe78')
+ ('https://apt.armbian.com/pool/main/l/linux-6.18.65/'
+ 'linux-image-current-sunxi_26.11.4_armhf__6.18.65-'
+ 'S4700-D7c7d-P2865-C70ca-H4b9e-HKff8b-V014b-Bdf9b-CVEfee3-R448a.deb'),
+ '2884801a24fa8da60b8ee07ec7650c1cc73571a4013c0bf4a986c136bd077715')
ASSET_INITRD = Asset(
('https://github.com/groeck/linux-build-test/raw/'
@@ -50,8 +50,8 @@ class OrangePiMachine(LinuxKernelTest):
def test_arm_orangepi(self):
self.set_machine('orangepi-pc')
kernel_path = self.archive_extract(
- self.ASSET_DEB, member='boot/vmlinuz-6.6.44-current-sunxi')
- dtb_path = ('usr/lib/linux-image-6.6.44-current-sunxi/' +
+ self.ASSET_DEB, member='boot/vmlinuz-6.18.65-current-sunxi')
+ dtb_path = ('usr/lib/linux-image-6.18.65-current-sunxi/' +
'sun8i-h3-orangepi-pc.dtb')
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
@@ -69,8 +69,8 @@ def test_arm_orangepi(self):
def test_arm_orangepi_initrd(self):
self.set_machine('orangepi-pc')
kernel_path = self.archive_extract(
- self.ASSET_DEB, member='boot/vmlinuz-6.6.44-current-sunxi')
- dtb_path = ('usr/lib/linux-image-6.6.44-current-sunxi/' +
+ self.ASSET_DEB, member='boot/vmlinuz-6.18.65-current-sunxi')
+ dtb_path = ('usr/lib/linux-image-6.18.65-current-sunxi/' +
'sun8i-h3-orangepi-pc.dtb')
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
initrd_path = self.uncompress(self.ASSET_INITRD)
@@ -100,8 +100,8 @@ def test_arm_orangepi_sd(self):
self.set_machine('orangepi-pc')
self.require_netdev('user')
kernel_path = self.archive_extract(
- self.ASSET_DEB, member='boot/vmlinuz-6.6.44-current-sunxi')
- dtb_path = ('usr/lib/linux-image-6.6.44-current-sunxi/' +
+ self.ASSET_DEB, member='boot/vmlinuz-6.18.65-current-sunxi')
+ dtb_path = ('usr/lib/linux-image-6.18.65-current-sunxi/' +
'sun8i-h3-orangepi-pc.dtb')
dtb_path = self.archive_extract(self.ASSET_DEB, member=dtb_path)
rootfs_path = self.uncompress(self.ASSET_ROOTFS)
diff --git a/tests/functional/arm/test_replay.py b/tests/functional/arm/test_replay.py
index ee61f475930..b8015e2ee52 100755
--- a/tests/functional/arm/test_replay.py
+++ b/tests/functional/arm/test_replay.py
@@ -24,10 +24,10 @@ def test_virt(self):
self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1)
ASSET_CUBIE_KERNEL = Asset(
- ('https://apt.armbian.com/pool/main/l/linux-6.6.44/'
- 'linux-image-current-sunxi_24.8.2_armhf__6.6.44-'
- 'S7213-D53de-P4ceb-C697eH5c21-HK01ba-V014b-B58e9-R448a.deb'),
- 'd960131bed01a8bf48882ff133a37826dfdce84138f9a82e0bea331ba795fe78')
+ ('https://apt.armbian.com/pool/main/l/linux-6.18.65/'
+ 'linux-image-current-sunxi_26.11.4_armhf__6.18.65-'
+ 'S4700-D7c7d-P2865-C70ca-H4b9e-HKff8b-V014b-Bdf9b-CVEfee3-R448a.deb'),
+ '2884801a24fa8da60b8ee07ec7650c1cc73571a4013c0bf4a986c136bd077715')
ASSET_CUBIE_INITRD = Asset(
('https://github.com/groeck/linux-build-test/raw/'
@@ -37,9 +37,9 @@ def test_virt(self):
def test_cubieboard(self):
self.set_machine('cubieboard')
kernel_path = self.archive_extract(self.ASSET_CUBIE_KERNEL,
- member='boot/vmlinuz-6.6.44-current-sunxi')
+ member='boot/vmlinuz-6.18.65-current-sunxi')
dtb_path = self.archive_extract(self.ASSET_CUBIE_KERNEL,
- member='usr/lib/linux-image-6.6.44-current-sunxi/sun4i-a10-cubieboard.dtb')
+ member='usr/lib/linux-image-6.18.65-current-sunxi/sun4i-a10-cubieboard.dtb')
initrd_path = self.uncompress(self.ASSET_CUBIE_INITRD)
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PULL 4/4] hw/virtio: don't mark virtio-crypto as secure
2026-12-04 13:05 [PULL for-11.2 0/4] Misc fixes patches Daniel P. Berrangé
` (2 preceding siblings ...)
2026-12-04 13:05 ` [PULL 3/4] tests/functional: update to newer sunxi kernels again Daniel P. Berrangé
@ 2026-12-04 13:05 ` Daniel P. Berrangé
2026-12-04 19:31 ` [PULL for-11.2 0/4] Misc fixes patches Richard Henderson
4 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2026-12-04 13:05 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P. Berrangé, Alex Bennée,
Philippe Mathieu-Daudé, Peter Maydell
This device was deprecated in aaf25b4ccc, and given the messaging
in that deprecation, it is inappropriate to claim it is intended
to provide a security boundary going forward.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
hw/virtio/virtio-crypto-pci.c | 2 +-
hw/virtio/virtio-crypto.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/virtio/virtio-crypto-pci.c b/hw/virtio/virtio-crypto-pci.c
index 7b7dd056169..c4089f49fe3 100644
--- a/hw/virtio/virtio-crypto-pci.c
+++ b/hw/virtio/virtio-crypto-pci.c
@@ -88,6 +88,6 @@ static const VirtioPCIDeviceTypeInfo virtio_crypto_pci_info = {
static void virtio_crypto_pci_register_types(void)
{
- virtio_pci_types_register(&virtio_crypto_pci_info);
+ virtio_pci_types_register_insecure(&virtio_crypto_pci_info);
}
type_init(virtio_crypto_pci_register_types)
diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c
index 51a99a6cf6e..6d053e7d936 100644
--- a/hw/virtio/virtio-crypto.c
+++ b/hw/virtio/virtio-crypto.c
@@ -1315,7 +1315,6 @@ static const TypeInfo virtio_crypto_info = {
.instance_size = sizeof(VirtIOCrypto),
.instance_init = virtio_crypto_instance_init,
.class_init = virtio_crypto_class_init,
- .secure = true,
};
static void virtio_register_types(void)
--
2.56.1
^ permalink raw reply related [flat|nested] 7+ messages in thread