From: Christian Meusel <christian.meusel@posteo.de>
To: connman@lists.linux.dev
Cc: Christian Meusel <christian.meusel@posteo.de>
Subject: [PATCH 0/1] Use a log identity always valid while logging
Date: Thu, 22 Feb 2024 23:23:25 +0000 [thread overview]
Message-ID: <20240222232326.1677146-1-christian.meusel@posteo.de> (raw)
I encountered garbled and changing log identifiers from connmand 1.42
running on Yocto Kirkstone.
Feb 09 02:40:18 foo time[590]: Connection Manager version 1.42
Feb 09 02:40:18 foo time[590]: ../connman-1.42/src/dbus.c:__connman_dbus_init()
Feb 09 02:40:18 foo time[590]: ../connman-1.42/src/main.c:parse_config() parsing main.conf
Feb 09 02:40:18 foo time[590]: Online check disabled by main config.
Feb 09 02:40:19 foo U[590]: ../connman-1.42/src/inotify.c:__connman_inotify_init()
Feb 09 02:40:19 foo U[590]: ../connman-1.42/src/technology.c:__connman_technology_init()
This variant is slightly patched (see
https://git.yoctoproject.org/poky/tree/meta/recipes-connectivity/connman/connman/0001-src-log.c-Include-libgen.h-for-basename-API.patch)
which creates a use-after-free situation. But nevertheless there is no
lifetime requirement communicated for the 'program' argument passed to
'__connman_log_init' and on the other hand 'basename' might as well
return a pointer to an internal buffer.
In either case, a locally allocated log identity string will prevent
potential issues.
Best regards,
Christian
Christian Meusel (1):
log: Use a log identity always valid while logging
src/log.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
--
2.34.1
next reply other threads:[~2024-02-22 23:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 23:23 Christian Meusel [this message]
2024-02-22 23:23 ` [PATCH 1/1] log: Use a log identity always valid while logging Christian Meusel
2024-04-18 16:31 ` [PATCH 0/1] " Denis Kenzior
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=20240222232326.1677146-1-christian.meusel@posteo.de \
--to=christian.meusel@posteo.de \
--cc=connman@lists.linux.dev \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).