Hello Sebastien, do you happen to have the reference SRU bug template
hosted anywhere else? The link is currently in 504. If you refer to the
description at the top of the page, I do not believe I have permission
to edit it. The SRU template (which I copied from other bug reports that
seemed well structured) is below, I am unsure whether it is the one you
want though (it is a slightly updated version of the one I included in
https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/2087772/comments/11
). It is the first time I contribute a patch here so I am unsure of the
correct procedures to follow.
[ Impact ]
On noble, libsqlite3 segfaults while preparing valid SQL with nested
parenthesized joins. The package is built with SQLITE_ALLOW_ROWID_IN_VIEW,
which triggers an upstream bug in SQLite 3.44.2 to 3.45.2, fixed in 3.45.3.
Programs using the system SQLite crash, for example the SQLAlchemy and Diesel
test suites. The upload backports the upstream fix.
[ Test Plan ]
On a clean noble system, for example "lxc launch ubuntu:24.04":
1. Run:
/usr/bin/python3 -c "import sqlite3;
sqlite3.connect(':memory:').executescript('CREATE TABLE users (id INTEGER
PRIMARY KEY, name TEXT); CREATE TABLE posts (id INTEGER PRIMARY KEY, user_id
INTEGER); CREATE TABLE comments (id INTEGER PRIMARY KEY, post_id INTEGER);
CREATE TABLE likes (comment_id INTEGER, user_id INTEGER); CREATE TABLE
followings (user_id INTEGER, post_id INTEGER); SELECT users.id FROM (users
INNER JOIN ((posts LEFT OUTER JOIN (comments LEFT OUTER JOIN likes ON
(likes.comment_id = comments.id)) ON (comments.post_id = posts.id)) LEFT OUTER
JOIN followings ON (followings.post_id = posts.id)) ON (posts.user_id =
users.id));'); print('ok')"
With libsqlite3-0 3.45.1-1ubuntu2.8 it prints "Segmentation fault".
2. Enable noble-proposed and run "sudo apt install -t noble-proposed
libsqlite3-0".
3. Run the command from step 1 again. It prints "ok".
[ Where problems could occur ]
The patch changes how "rowid" is resolved in views and subqueries. Visible
effects, all matching SQLite 3.45.3:
- some invalid rowid references now say "ambiguous column name: rowid" instead
of "no such column: rowid"
- SELECT rowid FROM (SELECT 1), t now returns the rowid of t instead of an error
- "rowid IS NULL" on a view now returns the matching rows instead of none
[ Other Info ]
Upstream fix https://sqlite.org/src/info/7a3d0027f81e8def, backported without
its new sqlite3_config() option, so the API is unchanged.
Only noble is affected. resolute (3.46.1-9ubuntu0.3) and stonking (3.53.4-2)
contain the fix and the Test Plan prints "ok" on both. jammy (3.37.2) and focal
(3.31.1) predate the bug.
Bug 2161638 is a duplicate.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2087772
Title:
crash (segfault) in libsqlite3 running multi-join query
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/2087772/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs