Commit Graph

543 Commits

Author SHA1 Message Date
Peter Marko
47124f2fda qemu: ignore CVE-2025-54566 and CVE-2025-54567
These CVEs are not applicable to version 8.2.x as the vulnerable code
was introduced inly in 10.0.0.

Debian made the analysis, reuse their work.
* https://security-tracker.debian.org/tracker/CVE-2025-54566
* https://security-tracker.debian.org/tracker/CVE-2025-54567

(From OE-Core rev: 77533b3dbd9cb82d6fad3c3d07872913a2991627)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2026-01-26 09:45:38 +00:00
Kai Kang
67ac024a29 qemu: fix CVE-2025-12464
Backport patch to fix CVE-2025-12464 for qemu.

Reference: https://gitlab.com/qemu-project/qemu/-/commit/a01344d9d7

(From OE-Core rev: c3108b279bd5c49a3c0ea35880fe7fd4f5b75b96)

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-12-31 07:49:31 -08:00
Peter Marko
a04f9ab3a5 qemu: patch CVE-2024-8354
Pick commit per [1].

[1] https://security-tracker.debian.org/tracker/CVE-2024-8354

(From OE-Core rev: 4bab523ed8ee34e8c09deb631fc82417aa0784b9)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-24 06:23:39 -07:00
Peter Marko
0ecde9a2a2 qemu: set status of CVE-2024-7730 to fixed
This was backported to v8.2.7 and also it is mentioned in commit
upgrading qemu in oe-core.

(From OE-Core rev: d05df779286288d1f8b69159ebcfc45a853bd23b)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-09-01 08:30:56 -07:00
Madhu Marri
f82d945d50 qemu 8.2.7: ignore CVE-2023-1386
Upstream Repository: https://gitlab.com/qemu-project/qemu.git

Bug Details:  https://nvd.nist.gov/vuln/detail/CVE-2023-1386
Type: Security Advisory
CVE: CVE-2023-1386
Score: 3.3

Analysis:
- According to redhat[1] this CVE has closed as not a bug.

Reference:
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2223985

(From OE-Core rev: 6a5d9e3821246c39ec57fa483802e1bb74fca724)

Signed-off-by: Madhu Marri <madmarri@cisco.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-04-01 09:08:42 -07:00
Khem Raj
d59b8312e9 qemu: Do not define sched_attr with glibc >= 2.41
* backporting, because it's also needed also for qemu-native builds
  on hosts with glibc >= 2.41

(From OE-Core rev: d34b38ecc2571fae0d58a34db1358dff2505148d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-02-14 06:38:54 -08:00
Peter Marko
cbafea41f5 qemu: set CVE-2024-6505 to fixed
CVE patch was removed on last upgrade as fixing commit was backported to
stable 8.2.x branch.

NVD DB has this CVE as version-less (with "-").
So explicit status set is needed to mark it as fixed.

(From OE-Core rev: 64359ec3b60ae68d39c2e6444f903fd20e397cff)

(From OE-Core rev: 33050bf82add43409675122a8f29acbcda4e8439)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-12-13 05:21:53 -08:00
Yogita Urade
2775596cb2 qemu: upgrade 8.2.3 -> 8.2.7
This includes fix for: CVE-2024-4693, CVE-2024-6505 and CVE-2024-7730

General changelog for 8.2: https://wiki.qemu.org/ChangeLog/8.2

Droped:
0001-target-riscv-kvm-change-KVM_REG_RISCV_FP_F-to-u32.patch
0002-target-riscv-kvm-change-KVM_REG_RISCV_FP_D-to-u64.patch
0003-target-riscv-kvm-change-timer-regs-size-to-u64.patch
CVE-2024-4467 and CVE-2024-7409 since already contained the fix.

(From OE-Core rev: 7983ad282c37f8c1125da5bab96489e5d0039948)

Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-12-06 05:50:25 -08:00
Chen Qi
dc5dd6ec19 qemu: back port patches to fix riscv64 build failure
Backport patches to fix riscv64 build failure.

(From OE-Core rev: ab7d0dcb49606651505bf167fd919bc969d97eed)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-25 05:07:47 -07:00
Archana Polampalli
0069bab748 qemu: fix CVE-2024-7409
A flaw was found in the QEMU NBD Server. This vulnerability allows a denial of service (DoS) attack
via improper synchronization during socket closure when a client keeps a socket open as the server
is taken offline.

(From OE-Core rev: 334f70c408ce5c95f145aa4657f343b023f7e1b4)

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-03 05:39:12 -07:00
Yogita Urade
8c533e9242 qemu: fix CVE-2024-4467
A flaw was found in the QEMU disk image utility (qemu-img) 'info'
command. A specially crafted image file containing a `json:{}`
value describing block devices in QMP could cause the qemu-img
process on the host to consume large amounts of memory or CPU time,
leading to denial of service or read/write to an existing external file

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-4467

Upstream Patches:
bd385a5298
2eb42a728d
7e1110664e
6bc30f1949
7ead946998

(From OE-Core rev: 0e309919b8807950cebc8924fc1e15763548b1f1)

Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-03 05:39:12 -07:00
Peter Marko
c0af0a839b qemu: set cve status for CVE-2023-6683
This CVE is fixed in v8.2.2 with v8.2.1-55-g480a6adc83

480a6adc83

(From OE-Core rev: 422fc84ddbe46580dc6d647eff62c4dbc8551e63)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-08-10 06:34:25 -07:00
Yogita Urade
aa02ad000d qemu: upgrade 8.2.2 -> 8.2.3
This includes fix for: CVE-2024-26327, CVE-2024-26328 and CVE-2024-3447

General changelog for 8.2: https://wiki.qemu.org/ChangeLog/8.2

Droped 0001-linux-user-x86_64-Handle-the-vsyscall-page-in-open_s.patch,
CVE-2024-3446 and CVE-2024-3567 since already contained the fix.

(From OE-Core rev: 1a6d502c04fad0d190bb665e9d454b85c0853fcc)

Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-08-06 19:11:18 -07:00
Xiangyu Chen
47789523dd qemu: Upgrade 8.2.1 -> 8.2.2
This was a bugfix release, this version fixed several important fixes
according to upstream.

Dropped CVE-2023-6683.patch since already contained the fix.

(From OE-Core rev: f548a3a24f3fc26b09e2fcc8544065beb5293f91)

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-07-12 05:47:20 -07:00
Hitendra Prajapati
402351d0e0 QEMU: Fix CVE-2024-3446 & CVE-2024-3567
Backport fixes for:

* CVE-2024-3446 - Upstream-Status: Backport from eb546a3f49  && 4f01537ced && fbeb0a160c && 1b2a52712b

* CVE-2024-3567 - Upstream-Status: Backport from 1cfe45956e

(From OE-Core rev: 9e22481ec84800b97d8908d57aed118895b16224)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-07-09 06:02:55 -07:00
Simone Weiß
9f60a16646 qemu: backport patch for ui/clipboard issue
Backported from upstream to fix CVE-2023-6683

(From OE-Core rev: d33a0ef657663faa05448454fad8a004879fe624)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-03 16:25:20 +00:00
Richard Purdie
9d1a99cf45 qemu: Replace workaround with proper usermode fix for shmat
We were using a workaround to avoid problems with the behaviour of shmat()
calls in usermode qemu. Switch to patches from upstream which are in review
but not merged yet.

Update the mmap fixed/noreplace workaround for the changes.

(From OE-Core rev: 8a571e352734045176bac310441a1003efbf0891)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-03 16:25:20 +00:00
Simone Weiß
5e21c5d64e meta: Remove some not needed CVE_STATUS
CVE_STATUS was set for those components, but meanwhile databases are updated
with corrected information, so setting the CVE_STATUS is not needed anymore.

(From OE-Core rev: 5ec6057cfa66ceeb33bec013e320f8e3fa7d7ecf)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-24 16:10:23 +00:00
Simone Weiß
378bc2f8e3 qemu: Set CVE_STATUS for wrong CVEs
All are already fixed in 8.2.1, NVD was informed that cpes are wrong.

(From OE-Core rev: a975960baffd341cd07cb093bef107c031c9b956)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-19 11:34:33 +00:00
Jose Quaresma
46fb0082dd qemu: disbale AF_XDP network backend support
This fix some host contaminations issues:
| /poky/build/tmp/hosttools/ld.bfd: libcommon.fa.p/net_af-xdp.c.o: undefined reference to symbol 'bpf_xdp_detach@@LIBBPF_0.7.0'
| /poky/build/tmp/hosttools/ld.bfd: /usr/lib/libbpf.so.1: error adding symbols: DSO missing from command line
| collect2: error: ld returned 1 exit status

The AF_XDP network backend support [1] requires the libxdp that is not
available in any layer, otherwise you can configure this option:
| PACKAGECONFIG[af-xdp] = "--enable-af-xdp,--disable-af-xdp,libxdp"

[1] cb039ef3d9

(From OE-Core rev: c2524614e49aee95b23d7bc162b1a30dee8cf59c)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-15 09:18:09 +00:00
Richard Purdie
25868ee2cc qemu: Upgrade 8.2.0 -> 8.2.1
This was a bugfix release containing several important fixes according to upstream.

Drop a backported patch.

(From OE-Core rev: 1715d0907d372e787c054a5509690a2719acfed0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05 14:06:10 +00:00
Khem Raj
3558ee528f qemu-native: Use inherit_defer for including native class
This helps working with native qemu recipes with devtool, since devtool
inserts an internal class called devtool-source resulting in

ERROR: QA Issue: qemu-system-native: native/nativesdk class is not inherited last, this can result in unexpected behaviour. Classes i
nherited after native/nativesdk: devtool-source.bbclass [native-last]
ERROR: Fatal QA errors were found, failing task.
ERROR: Parsing halted due to errors, see error messages above
ERROR: Command execution failed:

(From OE-Core rev: 6754387d7bd397700cef029ae6df86ff8cb3a4af)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-05 14:06:10 +00:00
Mark Hatle
069d2dfd86 qemu: Allow native and nativesdk versions on Linux older then 4.17
Linux kernel 4.17 introduced two new mmap flags, MAP_FIXED_NOREPLACE and
MAP_SHARED_VALIDATE.  Starting with QEMU 8.1, these flags are now used
and required for proper system operation.  In order to build and run on a
system older then 4.17, we need to emulate this new behavior.

Not having a newer kernel could result in the mmap memory being allocated
in a way that will cause failures without QEMU checking for these
conditions.  Note, memory allocation issues are rare in my experience so
this is more of a 'just-in-case' behavior.

SDK_OLDEST_KERNEL is currently set to 3.2.0, the only way this can claim
that qemu works in an SDK is by checking the return values to emulate
the expected behavior.

(From OE-Core rev: 4eb0a83c7851e2eb6d7890a130dfe50f37ff8ac9)

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-02 10:38:28 +00:00
Martin Jansa
f80f232fbd qemu: fix target build with ccache enabled
* with ccache inheritted, the BUILD_CC is 'ccache gcc', but because of missing
  quote it ends passing just ccache to host-cc which gets stripped and then
  it calls compiler[0] on empty compiler variable and breaks meson as shown in:
  http://errors.yoctoproject.org/Errors/Details/751436/

python version: Python 3.12.1
Traceback (most recent call last):
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/mesonmain.py", line 194, in run
    return options.run_func(options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 358, in run
    app.generate()
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 181, in generate
    return self._generate(env, capture, vslite_ctx)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/msetup.py", line 203, in _generate
    intr = interpreter.Interpreter(b, user_defined_options=user_defined_options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 331, in __init__
    self.parse_project()
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 132, in parse_project
    self.evaluate_codeblock(self.ast, end=1)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 198, in evaluate_codeblock
    raise e
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 190, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 204, in evaluate_statement
    return self.function_call(cur)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/interpreterbase.py", line 530, in function_call
    res = func(node, func_args, kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/decorators.py", line 260, in wrapper
    return f(*nargs, **wrapped_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreterbase/decorators.py", line 579, in wrapper
    return f(*wrapped_args, **wrapped_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1309, in func_project
    self.add_languages(proj_langs, False, MachineChoice.BUILD)
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1476, in add_languages
    success = self.add_languages_for(args, required, for_machine)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/interpreter/interpreter.py", line 1519, in add_languages_for
    comp = compilers.detect_compiler_for(self.environment, lang, for_machine, skip_sanity_check)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 115, in detect_compiler_for
    comp = compiler_from_language(env, lang, for_machine)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 112, in compiler_from_language
    return lang_map[lang](env, for_machine) if lang in lang_map else None
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 614, in detect_c_compiler
    return _detect_c_or_cpp_compiler(env, 'c', for_machine)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot-native/usr/lib/python3.12/site-packages/mesonbuild/compilers/detect.py", line 286, in _detect_c_or_cpp_compiler
    compiler_name = os.path.basename(compiler[0])
                                     ~~~~~~~~^^^
IndexError: list index out of range

...

Project name: qemu
Project version: 8.2.0
C compiler for the host machine: ccache x86_64-oe-linux-clang -target x86_64-oe-linux -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mlittle-endian --dyld-prefix=/usr -Qunused-arguments --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot -m64 -mcx16 (clang 17.0.6 "clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)")
C linker for the host machine: x86_64-oe-linux-clang -target x86_64-oe-linux -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -mlittle-endian --dyld-prefix=/usr -Qunused-arguments --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/qemu/8.2.0/recipe-sysroot -m64 -mcx16 ld.lld 17.0.6

../qemu-8.2.0/meson.build:1:0: ERROR: Unhandled python exception

    This is a Meson bug and should be reported!

ERROR: meson setup failed

(From OE-Core rev: 7e55102cff9ddecb4f0acbb3bcafa703dd9808fd)

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-30 15:15:54 +00:00
Khem Raj
0f61386628 qemu: Replace the basename patch with backport
Backport the patch that got applied to fix this issue upstream

(From OE-Core rev: 952c94988cf1cf093668e9ac7020485c51cf3a58)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-27 11:06:34 +00:00
Richard Purdie
f456f7b896 qemu: Fix segfaults in webkitgtk:do_compile on debian11
Add a work around for segfaults we're seeing with qemu 8.2.0 when
compiling webkitgtk on debian 11 autobuilder workers.

The issue has been reported upstream to work out an official fix.

[YOCTO #15367]

(From OE-Core rev: 28ab691587e689872b2e2ddd210507cc2ae86f9b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-26 14:25:31 +00:00
Richard Purdie
7f9dd77eae qemu: Upgrade 8.1.2 -> 8.2.0
We can drop the mips workaround patch since there were fixes in 8.2.0.

The build system changed and we should drop cross.patch and replace it with
explicit settings for cross-prefix, and host-cc. To make that work we need
to indicate we don't use a cross pkg-config.

PIE isn't availale for mingw so tweak PACKAGECONFIG accordingly.

(From OE-Core rev: 8917fa10b8afb1413b34a6134beea129e416f8c6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-24 15:46:19 +00:00
Richard Purdie
9a02fb66c2 qemu: add PACKAGECONFIG for sndio
In qemu's configuration this is an 'auto' configuration option so if the host has
the sndio headers on then it gets enabled, causing sstate reuse problems. This is
particularly problematic as some qemu pieces can 'see' into the host pkg-config
due to openGL linkage.

Add config and disable by default to avoid host contamination.

[YOCTO #15284]

(From OE-Core rev: e746182638aeb9bdd1bbb7430de214d8d847a8b6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-21 12:27:12 +00:00
Richard Purdie
c270131c53 qemu: Ensure pip and the python venv aren't used for meson
Qemu wants to use a supported python version and a specific meson version
to "help" users and uses pip and creates a venv to do this. This is a nightmare
for us. Our versions stay up to date and should be supported so we don't
really need/want this wrapping. Tweak things to disable it.

There was breakage from the wrapper shown by:

bitbake qemu-system-native
<add DISTRO_FEATURES:remove = "opengl" to local.conf>
bitbake qemu-system-native -c configure

which would crash. The issue is the change in configuration removes pieces
from the sysroot but pyc files remainm as do pieces of pip which causes
problems.

(From OE-Core rev: aceef7785e637a0223ecf288e2f367b6bee4a505)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-21 10:38:30 +00:00
Richard Purdie
85c88f8332 qemu: Clean up DEPENDS
Move the common dependencies to qemu.inc for cleaner entries in the
various recipes. Remove an unneeded inherit.

(From OE-Core rev: 6e7c2ae575b8f04fd117cc56980bb25113f343a8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-21 10:38:30 +00:00
Khem Raj
194ffa6fea qemu: Add packageconfig knob to enable pipewire support
This gets into a quessing mode if not specified and it it probelamactic
for native version since it maybe built on a machine having pipewire
  installed and used on another where pipewire is not installed (
  minimal CI builder ) it ends up with

runqemu - ERROR - Failed to run qemu: /mnt/b/yoe/master/build/tmp/work/x86_64-linux/qemu-helper-native/1.0/recipe-sysroot-native/usr/bin/qemu-system-x86_64: error while loading shared libraries: libpipewire-0.3.so.0: cannot open shared object file: No such file or directory

(From OE-Core rev: 0d63cadd4523e60d4959284a81fbe47da88834fa)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-21 10:38:29 +00:00
Khem Raj
53af03827e qemu: Fix build with latest musl
musl dropped basename() from string.h, adjust for that

(From OE-Core rev: 58f7eb2b5a2ae037294b631bf083729e78910c24)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-21 10:38:29 +00:00
Richard Purdie
60a434179c qemu: Upgrade 8.1.0 -> 8.1.2
Drop three backport patches as they're applied upstream.

(From OE-Core rev: 7480ff9064a74858e83e0ae275dbdb78dd6fc2a4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-30 17:12:19 +00:00
Lee Chee Yang
1e94086808 qemu: ignore RHEL specific CVE-2023-2680
(From OE-Core rev: 43b6d040979a766baa0fb2b1ff9125a94bb0152f)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-17 11:41:34 +01:00
Jon Mason
29f2ecdd6c qemu: drop unreferenced patch
OE Commit a7176c3b2a7e2041b9be5dabb6b0f1e62f235f76 removed the reference
to this patch but did not remove the patch

(From OE-Core rev: eeb7063ea70b861269aa820d19e6804b7841149e)

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-14 22:45:42 +01:00
Yogita Urade
ba7ac22f2e qemu: fix CVE-2023-42467
QEMU through 8.0.0 could trigger a division by zero in scsi_disk_reset
in hw/scsi/scsi-disk.c because scsi_disk_emulate_mode_select does not
prevent s->qdev.blocksize from being 256. This stops QEMU and the guest
immediately.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-42467
https://gitlab.com/qemu-project/qemu/-/issues/1813

(From OE-Core rev: 7c42b976d7a72acf917bae9d055768a1350e507d)

Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-06 11:51:11 +01:00
Richard Purdie
1b94ea8b25 recipes: Drop remaining PR values from recipes
We've been removing PR values from recipes at upgrade time for a while. In general
anyone maintaining a binary distro would end up having to curate these themselves
so the values in OE-Core aren't really that useful anymore. In many ways it makes
sense to clear out the remaining ones (which are mostly for 'config' recipes that
are unlikely to increase in PV) and leave a clean slate for anyone implementing
a binary distro config.

References are left in meta-selftest since the tests there do involve them and
their removal upon upgrade.

(From OE-Core rev: d4c346e8ab8f3cae25d1b01c7331ed9f6d4f96ef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22 07:45:17 +01:00
Khem Raj
a8b6f96018 qemu: Add PACKAGECONFIG for dax
Othereise it pokes at the build system and if ndctl is installed on the
system it adds dependency on libdaxctl which can make it not work on
other hosts where this is not available and qemu fails to run

Fixes

<recipe-sysroot-native>/usr/bin/qemu-system-x86_64: error while loading shared libraries: libdaxctl.so

(From OE-Core rev: 2d61f31d7044fdc06fa526d8fd2c7cf485e260c6)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-20 23:51:11 +01:00
Ross Burton
de3f6ad173 qemu-system-native: enable PNG support
It might be useful to grab screenshots from qemu-system-native (for
example, for QA purposes).

(From OE-Core rev: ff8a2edb396dfe2e9be37ddda38eaa76e63874a2)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 07:53:51 +01:00
Richard Purdie
fad769ae8b qemu: Add patches to resolve x86 and then mips boot issues
qemu 8.1.0 doesn't boot on x86. After adding tcg fixes for that, mips boot
breaks so also add patches for that as well.

(From OE-Core rev: 3d3fa94ee6d7ea58e3ec64d28bd6414437806cfd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 07:53:50 +01:00
Richard Purdie
f694084dbc qemu: Upgrade 8.0.4 -> 8.1.0
This upgrade isn't straighforward as upstream made changes. A pyenv
is now needed containing meson. This doesn't work for us for reasons
as yet unclear however it does mean we need python3native inherited
for that to stand a chance of working as otherwise host system
dependencies may be missing. For now, allow meson to work from our
sysroot via a patch. Our meson is always deterministic anyway so
we don't need their help for that.

The submodules approach used previously has changed, switch the options
for new ones to disable downloads and docs.

Some of the images binaries shipped for s390 show QA warnings for
relocations in code sections. Drop those binaries to avoid the QA
warnings since we don't need them anyway.

Drop a backported patch and refresh another.

(From OE-Core rev: a7176c3b2a7e2041b9be5dabb6b0f1e62f235f76)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-07 07:53:50 +01:00
Khem Raj
ca098d1728 qemu: Fix CVE-2023-40360
(From OE-Core rev: 5b68ec70ecc9779146789cc635d8ab60928e9233)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-30 09:56:13 +01:00
Markus Volk
513c21b8fc qemu: add packageconfigs for fuse and dbus-display
glib-2.0-native is needed to provide gdbus-codegen

(From OE-Core rev: 0df2247c7b670401fa9efda0a818fbad30f8f921)

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-29 09:41:07 +01:00
Markus Volk
be3f83029c qemu: build pulseaudio support depending on distro_feature
(From OE-Core rev: 6104325d32c95864830ba2d39f711d7e6e52bc00)

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-29 09:41:07 +01:00
Markus Volk
53774ffaf7 qemu: fix libudev packageconfig for systemd images
eudev is needed to provide libudev when not using systemd,
but including eudev breaks things for systemd. We can't
include eudev here since systemd provides libudev itself.

(From OE-Core rev: e86b572f260fae7837694aa4c6d61de639bc71e8)

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-29 09:41:07 +01:00
Richard Purdie
05affd7d0d qemu: Upgrade 8.0.3 -> 8.0.4
(From OE-Core rev: ed1789638d025447db8f28d71d119de85a696b09)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-15 08:15:25 +01:00
Mingli Yu
3abd781d34 qemu: Add qemu-common package
We split the qemu package [1] to add support to make user can install
one qemu arch emulation rpm to ease the concerns who care much about
the rpm size in embedded device.

But for the user who only install the qemu-*.rpm can't do anything
except they install the qemu emulation rpm like qemu-system-x86-64-*.rpm
explicitly.

So add qemu-common package to package all thing into qemu-common when
not split the package, and package only the basic into qemu-common and
other arch related to each qemu arch emulation rpm when split the package
to fix the backward compatibility.

qenu-*.rpm which is meta package rdepends on qemu-common and the available
qemu arch emulation rpm like qemu-system-x86-64-*.rpm and etc.

[1] https://git.openembedded.org/openembedded-core/commit/?id=893846ead7ee54d53e9076150cd655e0c8bca5db

(From OE-Core rev: 91c47aa06170081b64500471a39999b42cb1f400)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-15 08:15:25 +01:00
Andrej Valek
c15e506a46 cve_check: convert CVE_CHECK_IGNORE to CVE_STATUS
- Try to add convert and apply statuses for old CVEs
- Drop some obsolete ignores, while they are not relevant for current
  version

(From OE-Core rev: 1634ed4048cf56788cd5c2c1bdc979b70afcdcd7)

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Reviewed-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-21 11:52:26 +01:00
Etienne Cordonnier
d335aea8e8 qemu: fix typo
(From OE-Core rev: 0866acdc566cc1e2f16f6f8a041f6bd67b0abf2a)

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:06 +01:00
Trevor Gamblin
832c59d8b8 qemu: upgrade 8.0.0 -> 8.0.3
ppc.patch is removed because it is included in 8.0.3:
864ce70c1c

General changelog for 8.x: https://wiki.qemu.org/ChangeLog/8.0

(From OE-Core rev: bb5c368e48e2222312b1fc4ba4ad609b2530d6bc)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-07-14 17:31:05 +01:00