-
-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump up SQLite 3.41.2 to eliminate known vulnerabilities #540
Open
clang-clang-clang
wants to merge
1
commit into
coronalabs:master
Choose a base branch
from
dianchu:cve-sqlite-patch
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The NXS platform uses native sqlite3 lib, so no need for testing the patch
on that platform.
…On Fri, Mar 31, 2023 at 1:47 PM Jeremy ***@***.***> wrote:
According to the compatibility <https://www.sqlite.org/formatchng.html>
of SQLite, it should be easy to upgrade.
This PR affects Android/Windows/Linux/NXS. It has been test passed on
Android/Windows, but requires testing on Linux/NXS.
Vulnerabilities
The following vulnerabilities were reported by partner, and cannot be
detected by intel/cve-bin-tool <https://github.com/intel/cve-bin-tool>
since it cannot recognize SQLite, should be fixed:
- CVE-2017-10989 <https://github.com/advisories/GHSA-rp6h-mxcc-96r2>
- CVE-2018-20346 <https://github.com/advisories/GHSA-wpf6-c3rx-7xrj>
- CVE-2018-20505 <https://github.com/advisories/GHSA-rx75-3g2g-6hp5>
- CVE-2018-20506 <https://github.com/advisories/GHSA-hfxx-8v8g-6rcx>
- CVE-2018-8740 <https://github.com/advisories/GHSA-c753-vqf3-vjxh>
- CVE-2019-16168 <https://github.com/advisories/GHSA-m2vp-56p6-9q2h>
- CVE-2019-19645 <https://github.com/advisories/GHSA-g6wf-ch53-mgqf>
- CVE-2019-19646 <https://github.com/advisories/GHSA-g624-89xp-hmx8>
- CVE-2019-8457 <https://github.com/advisories/GHSA-p4jx-5p2x-4pq7>
- CVE-2020-11655 <https://github.com/advisories/GHSA-f86q-8q37-c2x4>
- CVE-2020-13434 <https://github.com/advisories/GHSA-fjp7-rxx4-gq9h>
- CVE-2020-13435 <https://github.com/advisories/GHSA-4hxf-56qj-qrgf>
- CVE-2020-13630 <https://github.com/advisories/GHSA-wgpm-4xgr-4mhp>
- CVE-2020-13631 <https://github.com/advisories/GHSA-ggrr-j79r-pq3m>
- CVE-2020-13632 <https://github.com/advisories/GHSA-vqf7-574h-2gf3>
- CVE-2020-15358 <https://github.com/advisories/GHSA-rq2p-jfw7-2cj3>
- CVE-2022-35737 <https://github.com/advisories/GHSA-jw36-hf63-69r9>
However, Solar2D 3688 used SQLite version contains more vulnerabilities
than the above.
Analysis
Solar2D 3688 implements SQLite through lsqlite3
<http://lua.sqlite.org/index.cgi/index>. Specifically, external/lsqlite3
is derived from lsqlite3 0.9.4 and includes Solar2D-specific
modifications. The actual version of SQLite3 linked varies by platform:
- Android/Windows/Linux/NXS uses SQLite 3.19.0 from external/sqlite3.
- Apple uses the corresponding SDK (dylib) provided by Xcode, for
example, 3.39.5 for Mac sim.
Changes
As the latest version of lsqlite 0.9.5 does not have any substantial
differences from 0.9.4 in lsqlite.c, SQLite will be upgraded instead, and
tested using lsqlite's tests.
This modification affects Android/Windows/Linux/NXS. Apple is not affected
as the SQLite binary version used is not from external/sqlite3. (Linux is
compiled through platform/linux/CMakeList.txt, while
platform/linux/*.project references lsqlite3 contains sqlite3.c is
different from snap)
Testing
Tested demo lsqlite_tests_on_solar2d.zip
<https://github.com/coronalabs/corona/files/11120950/lsqlite_tests_on_solar2d.zip>
passed on Android/Windows produced consistent results before (SQLite
3.19.0) and after (SQLite 3.41.2) modification. (After a simple
configuration of lunit, I still could not run the uni-test of
lsqlite/test, so I did not add uni-test in the testing.)
I was unable to test on Linux since I do not have physical Ubuntu
machines, and nested virtualization did not work on my virtual machine. I
also do not have NXS devices or development permissions. So, @bakeinflash
<https://github.com/bakeinflash>, can I ask you for help with testing?
Thank you.
------------------------------
You can view, comment on, or merge this pull request online at:
#540
Commit Summary
- 31f3a39
<31f3a39>
Bump up sqlite3 3.41.2
File Changes
(4 files <https://github.com/coronalabs/corona/pull/540/files>)
- *M* external/sqlite3/shell.c
<https://github.com/coronalabs/corona/pull/540/files#diff-b6307d54221c87d7688c17186e59ba6794a70841a84256990922411ab9dbc399>
(28674)
- *M* external/sqlite3/sqlite3.c
<https://github.com/coronalabs/corona/pull/540/files#diff-7fea5ab81feebe43a24e9a57d5a8db4d5fa58382da9584dc13832400de50af05>
(144336)
- *M* external/sqlite3/sqlite3.h
<https://github.com/coronalabs/corona/pull/540/files#diff-286863c589116184a81d0b51e9feca77c4fb1f774aa293cbab359e5f9b025dcb>
(4916)
- *M* external/sqlite3/sqlite3ext.h
<https://github.com/coronalabs/corona/pull/540/files#diff-0dc75b9e1aa71e4b23bb8a02abb264c56a34f8209ca3061f6c329ba49ce7c498>
(155)
Patch Links:
- https://github.com/coronalabs/corona/pull/540.patch
- https://github.com/coronalabs/corona/pull/540.diff
—
Reply to this email directly, view it on GitHub
<#540>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABI7FJF7IQBA574H3U3B4A3W62Y3FANCNFSM6AAAAAAWOPPYFU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@bakeinflash build linux through snap with LXD, seems LXD not work when I build on ubuntu VM, I will try it later. |
I use cmake for debugging.. Tested on Ubuntu22.. Works for me.
…On Fri, Mar 31, 2023 at 2:43 PM Jeremy ***@***.***> wrote:
@bakeinflash <https://github.com/bakeinflash> build linux through snap
with LXD, seems LXD not work when I build on ubuntu VM, I will try it later.
How do you compile the linux version locally? Is it directly cmake? I
forgot to try...
—
Reply to this email directly, view it on GitHub
<#540 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABI7FJCFC5KB7V2P5DR6TCTW627OXANCNFSM6AAAAAAWOPPYFU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the compatibility of SQLite, it should be easy to upgrade.
This PR affects Android/Windows/Linux/NXS. It has been test passed on Android/Windows, but requires testing on Linux/NXS.
Vulnerabilities
The following vulnerabilities were reported by partner, and cannot be detected by intel/cve-bin-tool since it cannot recognize SQLite, should be fixed:
However, Solar2D 3688 used SQLite version contains more vulnerabilities than the above.
Analysis
Solar2D 3688 implements SQLite through lsqlite3. Specifically,
external/lsqlite3
is derived fromlsqlite3 0.9.4
and includes Solar2D-specific modifications. The actual version of SQLite3 linked varies by platform:SQLite 3.19.0
fromexternal/sqlite3
.3.39.5
for Mac sim.Changes
As the latest version of
lsqlite 0.9.5
does not have any substantial differences from0.9.4
inlsqlite.c
, SQLite will be upgraded instead, and tested using lsqlite's tests.This modification affects Android/Windows/Linux/NXS. Apple is not affected as the SQLite binary version used is not from external/sqlite3. (Linux is compiled through
platform/linux/CMakeList.txt
, whileplatform/linux/*.project
references lsqlite3 containssqlite3.c
is different from snap)Testing
Tested demo lsqlite_tests_on_solar2d.zip passed on Android/Windows produced consistent results before (SQLite 3.19.0) and after (SQLite 3.41.2) modification. (After a simple configuration of
lunit
, I still could not run the uni-test of lsqlite/test, so I did not add uni-test in the testing.)I was unable to test on Linux since I do not have physical Ubuntu machines, and nested virtualization did not work on my virtual machine. I also do not have NXS devices or development permissions. So, @bakeinflash, can I ask you for help with testing?
Thank you.