Debian Patches

Status for qemu/1:8.2.1+ds-1~bpo12+1

Patch Description Author Forwarded Bugs Origin Last update
microvm-default-machine-type.patch set default machine type to be microvm if CONFIG_MICROVM is defined
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index def37e60f79..35b948ffb11 100644
Michael Tokarev <mjt@tls.msk.ru> not-needed 2020-02-22
linux-user-binfmt-P.diff [PATCH, HACK]: linux-user: handle binfmt-misc P flag as a separate exe name
A hackish way to distinguish the case when qemu-user binary is executed
using in-kernel binfmt-misc subsystem with P flag (preserve argv).
We register binfmt interpreter under name /usr/libexec/qemu-binfmt/qemu-foo-binfmt-P
(which is just a symlink to ../../bin/qemu-foo), and if run like that,
qemu-user binary will "know" it should interpret argv[1] & argv[2]
in a special way.

diff --git a/linux-user/main.c b/linux-user/main.c
index e44bdb17b8..587bd02db2 100644
Michael Tokarev <mjt@tls.msk.ru> yes 2021-02-13
note-missing-module-pkg-name.diff Note missing module package name
Debian ships different modules in different packages.
By default qemu ignores the fact that it can not load
a module, pretending this module never existed.
Give a useful hint about the package where the module
in question resides.

This is a hack, but it makes qemu packaged in debian
more user-friendly.

diff --git a/audio/audio.c b/audio/audio.c
index 8d1e4ad922..15f1071bdc 100644
Michael Tokarev <mjt@tls.msk.ru> not-needed 2021-08-22
skip-unpack-edk2-blobs.patch skip unpacking of edk2 blobs
Debian strips the blobs from qemu.orig.tar.gz so the code
fails to unpack the missing files.

diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index a7224ef469..ddaedd95af 100644
Michael Tokarev <mjt@tls.msk.ru> not-needed 2023-04-01
qemu-bridge-helper-path.patch set proper path for qemu-bridge-helper binary in the docs
Upstream should propagate this path from the config option.
This is a dumb-n-quick fix.

diff --git a/qemu-options.hx b/qemu-options.hx
index b56f6b2fb2..fe138c83d3 100644
Michael Tokarev <mjt@tls.msk.ru> no debian 2023-04-18
u-boot-sam460ex-fdi.patch u-boot-sam460ex: fdi fix
Fix the missing extern in a variable declaration,
resulting in this variable being repeated each time
this header is included, so the link with modern gcc
fails.

diff --git a/roms/u-boot-sam460ex/board/ACube/common/vesa.h b/roms/u-boot-sam460ex/board/ACube/common/vesa.h
index a6c32c3c2c..99672aa67b 100644
Michael Tokarev <mjt@tls.msk.ru> no
u-boot-sam460ex-mstring.patch u-boot-sam460ex: remove obsolete -mstring gcc option
Modern gcc complains about it.

diff --git a/roms/u-boot-sam460ex/arch/powerpc/cpu/ppc4xx/config.mk b/roms/u-boot-sam460ex/arch/powerpc/cpu/ppc4xx/config.mk
index 8f47c9b728..cf4414cee6 100644
Michael Tokarev <mjt@tls.msk.ru> no
openbios-array-bounds.diff openbios: drivers/usb.c: add pragma -Warray-bounds to work around gcc false positive
diff --git a/roms/openbios/drivers/usb.c b/roms/openbios/drivers/usb.c
index 88b7580..03f6ebb 100644
Michael Tokarev <mjt@tls.msk.ru> no
openbios-array-bounds-gcc12.patch openbios: do not error-out array-bounds warning
gcc-12.2 produces an apparently wrong warning for this file:

roms/openbios/arch/ppc/qemu/init.c:400:10: error: \
array subscript 0 is outside array bounds of uint32_t[0] {aka unsigned int[]} \
[-Werror=array-bounds]
400 | *dsi = 0x48002002;
| =====^===========

Turn this particular -Werror back into warning. Gcc is apparently wrong here.

index e40385a70b..2e214aa079 100644
Michael Tokarev <mjt@tls.msk.ru> invalid 2022-09-02
openbios-use-source_date_epoch-in-makefile.patch roms/openbios: Use SOURCE_DATE_EPOCH in Makefile.
Embedding the build time breaks reproducibility. Instead, use the date
specified by the SOURCE_DATE_EPOCH environment variable:

https://reproducible-builds.org/docs/source-date-epoch/

This patch relies on features of GNU date, and will need further
changes for portability to other systems.
Vagrant Cascadian <vagrant@reproducible-builds.org> no 2020-06-21
seabios-hppa-use-consistent-date-and-remove-hostname.patch roms/seabios-hppa: Use consistent date and remove hostname.
Two issues break reproducibility; the time and hostname get embedded
in the resulting seabios binary.

Simply drop the hostname from the embedded version string, as it
shouldn't be needed in Debian package builds.

Use the SOURCE_DATE_EPOCH environment variable to set the build date
rather than the current time:

https://reproducible-builds.org/docs/source-date-epoch/
Vagrant Cascadian <vagrant@reproducible-builds.org> no 2020-06-21
slof-remove-user-and-host-from-release-version.patch roms/SLOF/Makefile.gen: Remove user and host from release version.
This version string ends up in the slof.bin, leading to
reproducibility issues.
Vagrant Cascadian <vagrant@reproducible-builds.org> no 2020-06-22
slof-ensure-ld-is-called-with-C-locale.patch slof/Makefile.gen: Ensure ld is called with the C locale.
The output of "ld -V" changes based on the environment's locale.
Vagrant Cascadian <vagrant@reproducible-builds.org> no 2020-06-22
openbios-spelling-endianess.patch openbios: spelling: endiannes
diff --git a/roms/openbios/kernel/bootstrap.c b/roms/openbios/kernel/bootstrap.c
index b7658ab6e9..fb4506e3ac 100644
Michael Tokarev <mjt@tls.msk.ru> no
disable-xen-on-x32.patch disable xen on x32
Since 8.0, new xenpv now builds on X86_64, which is also
defined on x32, but it does not build on x32. Avoid it on x32.
Michael Tokarev <mjt@tls.msk.ru> invalid 2023-04-11
ui-clipboard-mark-type-as-not-available-when-no-data-CVE-2023-6683.patch ui/clipboard: mark type as not available when there is no data
With VNC, a client can send a non-extended VNC_MSG_CLIENT_CUT_TEXT
message with len=0. In qemu_clipboard_set_data(), the clipboard info
will be updated setting data to NULL (because g_memdup(data, size)
returns NULL when size is 0). If the client does not set the
VNC_ENCODING_CLIPBOARD_EXT feature when setting up the encodings, then
the 'request' callback for the clipboard peer is not initialized.
Later, because data is NULL, qemu_clipboard_request() can be reached
via vdagent_chr_write() and vdagent_clipboard_recv_request() and
there, the clipboard owner's 'request' callback will be attempted to
be called, but that is a NULL pointer.

In particular, this can happen when using the KRDC (22.12.3) VNC
client.

Another scenario leading to the same issue is with two clients (say
noVNC and KRDC):

The noVNC client sets the extension VNC_FEATURE_CLIPBOARD_EXT and
initializes its cbpeer.

The KRDC client does not, but triggers a vnc_client_cut_text() (note
it's not the _ext variant)). There, a new clipboard info with it as
the 'owner' is created and via qemu_clipboard_set_data() is called,
which in turn calls qemu_clipboard_update() with that info.

In qemu_clipboard_update(), the notifier for the noVNC client will be
called, i.e. vnc_clipboard_notify() and also set vs->cbinfo for the
noVNC client. The 'owner' in that clipboard info is the clipboard peer
for the KRDC client, which did not initialize the 'request' function.
That sounds correct to me, it is the owner of that clipboard info.

Then when noVNC sends a VNC_MSG_CLIENT_CUT_TEXT message (it did set
the VNC_FEATURE_CLIPBOARD_EXT feature correctly, so a check for it
passes), that clipboard info is passed to qemu_clipboard_request() and
the original segfault still happens.

Fix the issue by handling updates with size 0 differently. In
particular, mark in the clipboard info that the type is not available.

While at it, switch to g_memdup2(), because g_memdup() is deprecated.
Fiona Ebner <f.ebner@proxmox.com> invalid upstream, https://lists.nongnu.org/archive/html/qemu-devel/2024-01/msg04742.html 2024-01-24

All known versions for source package 'qemu'

Links