From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Format:SQLite database file" |
|---|
| claim | "Offset 0x60 of an SQLite database header holds the SQLITE_VERSION_NUMBER of the library that last modified the file (with the change counter at the time in 0x5C), so a program's data files tell which SQLite version it embeds without reading its code." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:SQLite database file" |
|---|
| observed_in | |
|---|
|
|---|
| data | | method | "magic" |
|---|
| indicator | "uint32_be at 0x60 = X*1000000 + Y*1000 + Z of SQLite 3.Y.Z; valid together with 0x5C == 0x18" |
|---|
| test_vectors | | input | "00 2E 95 C9 at 0x60" |
|---|
| expected | "3053001 = SQLite 3.53.1" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "92: version-valid-for number; 96: SQLITE_VERSION_NUMBER" |
|---|
| repo | "https://github.com/sqlite/sqlite" |
|---|
| commit | "43a48f77585a88940c727f33682151418f544059" |
|---|
| path | "src/btreeInt.h" |
|---|
| lines | "80-82" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Databases written through CPython 3.11's SQLite (sqlite3.sqlite_version 3.53.1) had 00 2E 95 C9 at 0x60 and 0x5C equal to the change counter" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Last writer version at offset 0x60" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T19:34:49.019Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T09:14:03.920Z" |
|---|
| result | "partial" |
|---|
| method | "Read btreeInt.h header layout at the cited commit: offset 92 'version-valid-for number', offset 96 SQLITE_VERSION_NUMBER, all big-endian; offset 24 file change counter. That 96 is the LAST writer's version and that 92 must equal the change counter at 24 to trust it is not stated in these lines, I did not read a source for it." |
|---|
| notes | "The data text 'valid together with 0x5C == 0x18' is ambiguous: it should read: the u32 at 0x5C equals the change counter u32 at 0x18." |
|---|
|
|
|---|