Re: Symbol Collision between ulogd and jansson

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is the result of finding symbols in ulogd and libjansson.

$ nm -D libjansson.so | grep hashtable_del
0000000000005b50 T hashtable_del@@JANSSON_4

$ nm ulogd | grep hashtable_del
0000000000007704 T hashtable_del

We did not build it as a static library.
Like you mentioned, I also do not know the exact reason why a SEGV occurs in this case.
However, I have confirmed through sources like GPT that symbol collisions can occur in such situations (the possibility of symbol collisions due to the loading order of libraries).

Answers of GPT:
Therefore, even if a symbol version like hashtable_del@@JANSSON_4 exists, if a symbol with the same name is defined in another library, a symbol collision can still occur.
In such cases, which symbol gets called will depend on factors such as library load order, version information, and environment variable settings.

Anyway, I'll update the patch (including Signed-off-by: ) in next reply to divide the content.

________________________________________
보낸 사람: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
보낸 날짜: 2025년 1월 14일 화요일 오전 7:23
받는 사람: 조홍식/책임연구원/SW Security개발실 SW Security TP <hongsik.jo@xxxxxxx>
참조: netfilter-devel@xxxxxxxxxxxxxxx <netfilter-devel@xxxxxxxxxxxxxxx>; 손영섭/책임연구원/SW Security개발실 SW Security TP <loth.son@xxxxxxx>; 남정주/책임연구원/SW Security개발실 SW Security TP <jungjoo.nahm@xxxxxxx>; 정재윤/Task Leader/SW Platform(연)선행Platform개발실 시스템SW Task <jaeyoon.jung@xxxxxxx>
제목: Re: Symbol Collision between ulogd and jansson
 
Hi,

On Mon, Jan 13, 2025 at 06:41:19AM +0000, 조홍식/책임연구원/SW Security개발실 SW Security TP 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.

$ nm -D libjansson.so.4 | grep hashtable_del
$

Are you building a static binary? Otherwise, I don't see how the clash
is going on.

I am fine with this patch, would you submit it using git format-patch
and including Signed-off-by:?

Thanks.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux