public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Yoann Congal" <yoann.congal@smile.fr>
To: "Yoann Congal" <yoann.congal@smile.fr>,
	<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][scarthgap 13/16] systemd: backport patch to fix journal-file issue
Date: Mon, 30 Mar 2026 00:42:59 +0200	[thread overview]
Message-ID: <DHFMNVW9ZVEV.29R24OVVFJNN4@smile.fr> (raw)
In-Reply-To: <5c63919aec50486f218123890585d791c0e45aab.1774823430.git.yoann.congal@smile.fr>

On Mon Mar 30, 2026 at 12:37 AM CEST, Yoann Congal wrote:
> From: sureshha <suresh.ha@bti.bmwgroup.com>
>
> Backport patch to fix systemd journal-file assertion on removed or corrupted files
>
> Extracted from systemd MR:
> https://github.com/systemd/systemd/pull/40378
>
> Signed-off-by: sureshha <suresh.ha@bmwtechworks.in>
> Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
> ---

I did not wanted to send that patch, please ignore.

>  ...not-trigger-assertion-on-removed-or-.patch | 65 +++++++++++++++++++
>  meta/recipes-core/systemd/systemd_255.21.bb   |  1 +
>  2 files changed, 66 insertions(+)
>  create mode 100644 meta/recipes-core/systemd/systemd/0023-journal-file-do-not-trigger-assertion-on-removed-or-.patch
>
> diff --git a/meta/recipes-core/systemd/systemd/0023-journal-file-do-not-trigger-assertion-on-removed-or-.patch b/meta/recipes-core/systemd/systemd/0023-journal-file-do-not-trigger-assertion-on-removed-or-.patch
> new file mode 100644
> index 00000000000..5f5551870ac
> --- /dev/null
> +++ b/meta/recipes-core/systemd/systemd/0023-journal-file-do-not-trigger-assertion-on-removed-or-.patch
> @@ -0,0 +1,65 @@
> +From 1350f39db7e72116c3b2423db02da3ddc8e29082 Mon Sep 17 00:00:00 2001
> +From: Yu Watanabe <watanabe.yu+github@gmail.com>
> +Date: Sun, 18 Jan 2026 19:15:31 +0900
> +Subject: [PATCH] journal-file: do not trigger assertion on removed or
> + corrupted journal file
> +
> +When a journal file is removed or corrupted, then the value `p`, which is
> +read from Object.data.entry_offset, may be zero.
> +
> +Note, journal_file_move_to_object() checks the passed offset and return
> +-EBADMSG if it is invalid.
> +
> +Fixes the issue reported at
> +https://github.com/systemd/systemd/pull/40372#issuecomment-3762907261.
> +
> +Upstream-Status: Backport [https://github.com/systemd/systemd/commit/2185c30de333b09f46ef28b743b123f45e774738]
> +
> +Comment: Patch is refreshed as per codebase of v255
> +
> +Signed-off-by: sureshha <suresh.ha@bmwtechworks.in>
> +---
> + src/libsystemd/sd-journal/journal-file.c | 7 +++----
> + 1 file changed, 3 insertions(+), 4 deletions(-)
> +
> +diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c
> +index 08f3b82..633de5b 100644
> +--- a/src/libsystemd/sd-journal/journal-file.c
> ++++ b/src/libsystemd/sd-journal/journal-file.c
> +@@ -3305,7 +3305,9 @@ use_extra:
> +
> + static int test_object_offset(JournalFile *f, uint64_t p, uint64_t needle) {
> +         assert(f);
> +-        assert(p > 0);
> ++
> ++        if (p <= 0)
> ++                return -EBADMSG;
> +
> +         if (p == needle)
> +                 return TEST_FOUND;
> +@@ -3341,7 +3343,6 @@ static int test_object_seqnum(JournalFile *f, uint64_t p, uint64_t needle) {
> +         int r;
> +
> +         assert(f);
> +-        assert(p > 0);
> +
> +         r = journal_file_move_to_object(f, OBJECT_ENTRY, p, &o);
> +         if (r < 0)
> +@@ -3382,7 +3383,6 @@ static int test_object_realtime(JournalFile *f, uint64_t p, uint64_t needle) {
> +         int r;
> +
> +         assert(f);
> +-        assert(p > 0);
> +
> +         r = journal_file_move_to_object(f, OBJECT_ENTRY, p, &o);
> +         if (r < 0)
> +@@ -3423,7 +3423,6 @@ static int test_object_monotonic(JournalFile *f, uint64_t p, uint64_t needle) {
> +         int r;
> +
> +         assert(f);
> +-        assert(p > 0);
> +
> +         r = journal_file_move_to_object(f, OBJECT_ENTRY, p, &o);
> +         if (r < 0)
> +--
> +2.34.1
> diff --git a/meta/recipes-core/systemd/systemd_255.21.bb b/meta/recipes-core/systemd/systemd_255.21.bb
> index 87e186bbfac..504d6cbef60 100644
> --- a/meta/recipes-core/systemd/systemd_255.21.bb
> +++ b/meta/recipes-core/systemd/systemd_255.21.bb
> @@ -29,6 +29,7 @@ SRC_URI += " \
>             file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
>             file://0003-timedated-Respond-on-org.freedesktop.timedate1.SetNT.patch \
>             file://0008-implment-systemd-sysv-install-for-OE.patch \
> +           file://0023-journal-file-do-not-trigger-assertion-on-removed-or-.patch \
>             "
>  
>  # patches needed by musl


-- 
Yoann Congal
Smile ECS



  reply	other threads:[~2026-03-29 22:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-29 22:37 [OE-core][scarthgap 00/16] Patch review Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 01/16] tzdata,tzcode-native: Upgrade 2025b -> 2025c Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 02/16] python3-cryptography: Fix CVE-2026-26007 Yoann Congal
2026-03-29 22:46   ` Patchtest results for " patchtest
2026-03-29 22:37 ` [OE-core][scarthgap 03/16] spdx: add option to include only compiled sources Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 04/16] dtc: backport fix for build with glibc-2.43 Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 05/16] pseudo: Add fix for glibc 2.43 Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 06/16] yocto-uninative: Update to 5.0 for needed patchelf updates Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 07/16] yocto-uninative: Update to 5.1 for glibc 2.43 Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 08/16] elfutils: don't add -Werror to avoid discarded-qualifiers Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 09/16] binutils: backport patch to fix build with glibc-2.43 on host Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 10/16] python3-pyopenssl: Fix CVE-2026-27448 Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 11/16] python3-pyopenssl: Fix CVE-2026-27459 Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 12/16] gnutls: Fix CVE-2025-14831 Yoann Congal
2026-03-29 22:42   ` Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 13/16] systemd: backport patch to fix journal-file issue Yoann Congal
2026-03-29 22:42   ` Yoann Congal [this message]
2026-03-29 22:37 ` [OE-core][scarthgap 14/16] libxml-parser-perl: fix for CVE-2006-10003 Yoann Congal
2026-03-29 22:43   ` Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 15/16] busybox: fix for CVE-2026-26157, CVE-2026-26158 Yoann Congal
2026-03-29 22:43   ` Yoann Congal
2026-03-29 22:37 ` [OE-core][scarthgap 16/16] rust: Enable dynamic linking with llvm Yoann Congal
2026-03-29 22:43   ` Yoann Congal
2026-03-29 22:41 ` [OE-core][scarthgap 00/16] Patch review Yoann Congal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DHFMNVW9ZVEV.29R24OVVFJNN4@smile.fr \
    --to=yoann.congal@smile.fr \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox