Bug 1692365 (CVE-2019-9936)

Summary: CVE-2019-9936 sqlite: heap-based buffer over-read in function fts5HashEntrySort in sqlite3.c
Product: [Other] Security Response Reporter: Dhananjay Arunesh <darunesh>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: databases-maint, hhorak, itamar, jakub.dornak, mbenatto, mschorm, pkubat, praiskup, wilmer5
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: 2021-10-27 03:27:15 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: 1692366, 1695693    
Bug Blocks: 1692370    

Description Dhananjay Arunesh 2019-03-25 13:00:39 UTC
In SQLite 3.27.2, running fts5 prefix queries inside a transaction could trigger a heap-based buffer over-read in fts5HashEntrySort in sqlite3.c, which may lead to an information leak. This is related to ext/fts5/fts5_hash.c.

References:
https://sqlite.org/src/info/b3fa58dd7403dbd4 
https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg114382.html
https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg114394.html

Comment 1 Dhananjay Arunesh 2019-03-25 13:00:52 UTC
Created sqlite tracking bugs for this issue:

Affects: fedora-all [bug 1692366]

Comment 3 Marco Benatto 2019-04-03 15:02:48 UTC
Statement:

This issue did not affect the versions of sqlite as shipped with Red Hat Enterprise Linux 6 and 7 as they did not include support for fts5.

Comment 6 Marco Benatto 2019-05-15 12:21:07 UTC
Upstream patch:
https://sqlite.org/src/info/b3fa58dd7403dbd4