Skip to content
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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clang-clang-clang
Copy link
Contributor

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 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 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.

@bakeinflash
Copy link
Collaborator

bakeinflash commented Mar 31, 2023 via email

@bakeinflash
Copy link
Collaborator

bakeinflash commented Mar 31, 2023 via email

@clang-clang-clang
Copy link
Contributor Author

@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...

@bakeinflash
Copy link
Collaborator

bakeinflash commented Mar 31, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants