Bug 2133668 (CVE-2021-42523)

Summary: CVE-2021-42523 colord: potential memory leak, forgetting to free error message of libsqlite3 API 'sqlite3_exec' -1
Product: [Other] Security Response Reporter: Sandipan Roy <saroy>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: gnome-sig, go-sig, michel, oskutka, rhughes, tkral
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-12 14:33:09 UTC Type: ---
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: 2133669, 2133670, 2133671, 2133672, 2133673, 2133674    
Bug Blocks: 2132787    

Description Sandipan Roy 2022-10-11 06:47:14 UTC
According to libsqlite3 API document, "To avoid memory leaks, the application should invoke sqlite3_free() on error message strings returned through the 5th parameter of sqlite3_exec() after the error message string is no longer needed."

https://github.com/hughsie/colord/issues/110

openSUSE has issued an advisory on October 4:
https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/2GDIFQ2MG4MYMILUVYH7MTM5YKO2AMDS/

Comment 1 Sandipan Roy 2022-10-11 06:50:19 UTC
Created colord tracking bugs for this issue:

Affects: fedora-35 [bug 2133669]
Affects: fedora-36 [bug 2133672]


Created golang-entgo-ent tracking bugs for this issue:

Affects: fedora-35 [bug 2133670]
Affects: fedora-36 [bug 2133673]


Created mingw-colord tracking bugs for this issue:

Affects: fedora-35 [bug 2133671]
Affects: fedora-36 [bug 2133674]

Comment 3 Richard Hughes 2022-10-12 14:33:09 UTC
This is not a bug. Leaking a few bytes of memory for a failure case THAT CANNOT BE TRIGGED is not a security vulnerability in any way. CVE-2021-42523 should never have been issued and I believe it was only opened for someone to put on his resume. CWE-200 is an completely incorrect classification for this bug.