Bug 2001067

Summary: backport build fix to add symbol versions
Product: Red Hat Enterprise Linux 9 Reporter: Eric Garver <egarver>
Component: json-cAssignee: Tomas Korbar <tkorbar>
Status: CLOSED ERRATA QA Contact: FrantiĊĦek Hrdina <fhrdina>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: psklenar, rhel-cs-infra-services-qe, tkorbar
Target Milestone: rcKeywords: AutoVerified, TestCaseProvided, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: json-c-0.14-11.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2001063 Environment:
Last Closed: 2022-05-17 15:57:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2001063, 2219521    
Bug Blocks: 2023314, 2023315, 2023316, 2023317, 2023318, 2023319, 2023320, 2023321, 2023322, 2023323, 2023324, 2023325, 2023326, 2023327, 2023328, 2023329, 2023330, 2023331    

Description Eric Garver 2021-09-03 17:08:53 UTC
+++ This bug was initially created as a clone of Bug #2001063 +++

This bug was initially created as a copy of Bug #2001062

I am copying this bug because: same thing applies to json-c



Multiple JSON libraries have the same API functions. This can cause the wrong function to be used if there are multiple JSON libraries in the dynamic library list. This may manifest as a segfault or very odd behavior. Fixing these libraries will of course require recursive version bumps and rebuilds of packages that use them so they utilize the versioned symbol.

The "very odd behavior" case is very interesting. See this firewalld bug report:

  https://github.com/firewalld/firewalld/issues/819

In the firewalld case, python GI module pulls in libmount which pulls in libcryptsetup which pulls in json-c.

Example conflict: libnftables uses libjansson. libcryptsetup uses json-c. It's not clear which json_object_get() function will be used.

Note: JSON-GLib is also likely affected. But I did not track down any fixes on their end. If 2/3 of the libraries are versioned then I _think_ it should be okay.

--

firewalld bug report: https://github.com/firewalld/firewalld/issues/819
guestfs bug report: bug 1923971
jansson bug report: https://github.com/akheron/jansson/issues/460
json-c bug report: https://github.com/json-c/json-c/issues/621

Upstream fixes:

  jansson: https://github.com/akheron/jansson/pull/540
  json-c: https://github.com/json-c/json-c/pull/639

Comment 12 errata-xmlrpc 2022-05-17 15:57:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: json-c), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:3975