From: Florian Westphal <fw@strlen.de>
To: "조홍식/책임연구원/SW Security개발실 SW Security TP" <hongsik.jo@lge.com>
Cc: "netfilter-devel@vger.kernel.org"
<netfilter-devel@vger.kernel.org>,
"손영섭/책임연구원/SW Security개발실 SW Security TP" <loth.son@lge.com>,
"남정주/책임연구원/SW Security개발실 SW Security TP" <jungjoo.nahm@lge.com>,
"정재윤/Task Leader/SW Platform(연)선행Platform개발실 시스템SW Task"
<jaeyoon.jung@lge.com>
Subject: Re: Symbol Collision between ulogd and jansson
Date: Tue, 14 Jan 2025 11:41:14 +0100 [thread overview]
Message-ID: <20250114104114.GA1924@breakpoint.cc> (raw)
In-Reply-To: <SE1P216MB155825DDA1CD5809E1569DDE8F1F2@SE1P216MB1558.KORP216.PROD.OUTLOOK.COM>
조홍식/책임연구원/SW Security개발실 SW Security TP <hongsik.jo@lge.com> wrote:
> The issue I would like to bring to your attention is as follows:
> We are using the JSON feature in the PACKAGECONFIG of ulogd, and we have discovered that both ulogd and jansson have methods with the same name, which can lead to a symbol reference error resulting in a segmentation fault.
> The method in question is hashtable_del().
> Based on our backtrace analysis, it appears that when ulogd's hashtable_del() is executed instead of jansson's hashtable_del(), it leads to a segmentation fault (SEGV).
> To avoid this symbol collision, I modified ulogd's hashtable_del() to hashtable_delete(), and I have confirmed that this resolves the issue.
>
> For your reference,
> 1. Our backtrace analysis
> (gdb) bt
> #0 0x000000558ed47730 in __llist_del (next=0x3433326335357830, prev=0x30623663) at /usr/src/debug/ulogd2/2.0.8+git/include/ulogd/linuxlist.h:107
> #1 llist_del (entry=0x7fc5c38460) at /usr/src/debug/ulogd2/2.0.8+git/include/ulogd/linuxlist.h:119
> #2 hashtable_del (table=table@entry=0x7fc5c38530, n=n@entry=0x7fc5c38460) at /usr/src/debug/ulogd2/2.0.8+git/src/hash.c:96
> #3 0x0000007f95234600 in do_dump (json=0x55c234c6b0, flags=0, depth=0, parents=0x7fc5c38530, dump=0x7f95233ad0 <dump_to_strbuffer>, data=0x7fc5c385b0) at /usr/src/debug/jansson/2.14/src/dump.c:416
> #4 0x0000007f952348e4 in json_dump_callback (json=json@entry=0x55c234c6b0, callback=callback@entry=0x7f95233ad0 <dump_to_strbuffer>, data=data@entry=0x7fc5c385b0, flags=flags@entry=0) at /usr/src/debug/jansson/2.14/src/dump.c:486
> #5 0x0000007f952349a0 in json_dumps (json=json@entry=0x55c234c6b0, flags=flags@entry=0) at /usr/src/debug/jansson/2.14/src/dump.c:433
> #6 0x0000007f95271934 in json_interp (upi=0x55c2358690) at /usr/src/debug/ulogd2/2.0.8+git/output/ulogd_output_JSON.c:399
>
> I think this hashtable_del() should be
> https://github.com/akheron/jansson/blob/v2.14/src/hashtable.c#L275 ( jansson's hashtable_del )
> But #2 says that the hashtable_del() is ulogd2's one. https://github.com/inliniac/ulogd2/blob/master/src/hash.c#L94 ( ulogd's hashtable_del )
>
Uhm. What jansson version are you using?
commit 7c707a73a2251c20afaecc028267b99d0ee60184
Author: Petri Lehtinen <petri@digip.org>
Date: Sun Nov 29 13:04:00 2009 +0200
Only export symbols starting with "json_" in libjansson.la
This way we don't pollute the symbol namespace with internal symbols.
next prev parent reply other threads:[~2025-01-14 10:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 6:41 Symbol Collision between ulogd and jansson 조홍식/책임연구원/SW Security개발실 SW Security TP
2025-01-13 22:23 ` Pablo Neira Ayuso
2025-01-14 5:00 ` 조홍식/책임연구원/SW Security개발실 SW Security TP
2025-01-14 5:02 ` 조홍식/책임연구원/SW Security개발실 SW Security TP
2025-01-14 10:41 ` Florian Westphal [this message]
2025-01-14 12:50 ` 정재윤/Task Leader/SW Platform(연)선행Platform개발실 시스템SW Task
2025-01-14 13:32 ` Florian Westphal
2025-01-15 8:08 ` 조홍식/책임연구원/SW Security개발실 SW Security TP
2025-01-15 12:29 ` Florian Westphal
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=20250114104114.GA1924@breakpoint.cc \
--to=fw@strlen.de \
--cc=hongsik.jo@lge.com \
--cc=jaeyoon.jung@lge.com \
--cc=jungjoo.nahm@lge.com \
--cc=loth.son@lge.com \
--cc=netfilter-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.