GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — Update Rust crate sqlx to 0.8.0 [SECURITY] by renovate[bot] · Pull Request #121 · developing-today/code Conversation
|
| Package | Type | Update | Change |
|---|---|---|---|
| sqlx | dependencies | minor | 0.7.1 → 0.8.0 |
The following presentation at this year's DEF CON was brought to our attention on the SQLx Discord:
SQL Injection isn't Dead: Smuggling Queries at the Protocol Level
http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn't%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf
(Archive link for posterity.)
Essentially, encoding a value larger than 4GiB can cause the length prefix in the protocol to overflow,
causing the server to interpret the rest of the string as binary protocol commands or other data.
It appears SQLx does perform truncating casts in a way that could be problematic,
for example: https://github.com/launchbadge/sqlx/blob/6f2905695b9606b5f51b40ce10af63ac9e696bb8/sqlx-postgres/src/arguments.rs#L163
This code has existed essentially since the beginning,
so it is reasonable to assume that all published versions <= 0.8.0 are affected.
As always, you should make sure your application is validating untrustworthy user input.
Reject any input over 4 GiB, or any input that could encode to a string longer than 4 GiB.
Dynamically built queries are also potentially problematic if it pushes the message size over this 4 GiB bound.
Encode::size_hint()
can be used for sanity checks, but do not assume that the size returned is accurate.
For example, the Json<T> and Text<T> adapters have no reasonable way to predict or estimate the final encoded size,
so they just return size_of::<T>() instead.
For web application backends, consider adding some middleware that limits the size of request bodies by default.
Work has started on a branch to add #[deny] directives for the following Clippy lints:
and to manually audit the code that they flag.
A fix is expected to be included in the 0.8.1 release (still WIP as of writing).
Medium
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
v0.8.116 pull requests were merged this release cycle.
This release contains a fix for RUSTSEC-2024-0363.
Postgres users are advised to upgrade ASAP as a possible exploit has been demonstrated:
#3440 (comment)
MySQL and SQLite do not appear to be exploitable, but upgrading is recommended nonetheless.
MySqlConnectOptions::no_engine_substitution() [[@kolinfluence]]
MySqlConnectOptions::no_engine_subsitution() (oops) in favor of the correctly spelled version.spec_error module [[@abonander]]
libsqlite3-sys=0.30.1 to support sqlite 3.46 [[@CommanderStorm]]ring (the existing implementation),aws-lc-rs which has optional FIPS certification.runtime-tokio-rustls, runtime-async-std-rustls, tls-rustls)ring provider of RusTLS to match the existing behavior so this should not be a breaking change.tls-rustls-aws-lc-rs feature to use the aws-lc-rs provider.
runtime-tokio-rustls or runtime-async-std-rustls,runtime-tokio or runtime-async-stdsqlx::Type [[@alu]]node12 in SQLx action [[@hamirmahal]]v0.18.1 to avoid yanked v0.14.3 [[@CommanderStorm]]v0.8.070 pull requests were merged this release cycle.
#2697 was merged the same day as release 0.7.4 and so was missed by the automatic CHANGELOG generation.
#[sqlx::test] usages are applied in the correct order now.MigrateError.-- no-transaction to the beginning.Migrationi64 as intermediate when decoding [[@abonander]]
#[derive(sqlx::Type)] in Postgres [[@abonander]]
#[sqlx(no_pg_array)] where conflicts occur.PgTypeInfo::with_name() infers types that start with _ to be arrays of the un-prefixed type. Wrap type names in quotes to bypass this behavior.FromRow, return Error::ColumnDecode for TryFrom errors [[@abonander]]
#[sqlx(try_from = "T")] now return Error::ColumnDecode instead of Error::ColumnNotFound.#[sqlx(default)] on an individual field or the struct itself would have previously suppressed the error.From and apply the default explicitly.#[sqlx(rename)] and #[sqlx(rename_all)] to match the expected behavior (rename wins).ConnectOptions::to_url_lossy() to match what parsing expects.MySqlTime, audit mysql::types for panics [[@abonander]]NonZero* scalar types [[@AlphaKeks]]Send trait bound from argument binding [[@bobozaur]]libsqlite3-sys are not considered breaking changes as per our semver guarantees.MySqlConnection to reduce sizes of futures [[@stepantubanov]]sqlx migrate add ... [[@CommanderStorm]]ConnectionHandleRaw type [[@abonander]]docker compose instead of docker-compose [[@abonander]]path ownership problems when using sqlx_macros_unstable [[@lily-mosquitoes]]sqlx_postgres::any [[@Zarathustra2]]migrate error message. (#3275) [[@nk9]]persistent query setting when preparing queries with the Any driver [[@etorreborre]]select_input_type!() being unhygenic [[@CommanderStorm]]M or C Notice fields are not UTF-8 [[@YgorSouza]]json-feature should activate sqlx-postgres?/json as well [[@CommanderStorm]]clock and std features of workspace.dependencies.chrono.v0.7.438 pull requests were merged this release cycle.
This is officially the last release of the 0.7.x release cycle.
As of this release, development of 0.8.0 has begun on main and only high-priority bugfixes may be backported.
to_url_lossy to connect options [[@lily-mosquitoes]]query! for cargo-free systems [[@kshramt]]raw_sql API [[@abonander]]
query*() and query!().query*() functions.execute_many() and fetch_many() on interfaces that use prepared statements.
raw_sql API retains this functionality because it explicitly does not use prepared statements.create_new instead of atomic-file-write [[@mattfbacon]]PgConnectOptions [[@Fyko]]#[sqlx::test] [[@ciffelia]]sqlx::migrate::Migrator.migrate!().v0.7.338 pull requests were merged this release cycle.
fixtures_path in sqlx::test args [[@ripa1995]]fn PgConnectOptions::get_host(&self) [[@boris-lok]]FromRow for the unit type [[@nanoqsh]]MySqlConnectOptions::get_database() [[@shiftrightonce]]Text adapter [[@abonander]]BOOLEAN and the query macros [[@abonander]]NUMERIC support [[@abonander]]libsqlite3-sys to 0.27.0
libsqlite3-sys is considered semver-exempt;rust_decimal::Decimal for high-precision values [[@abonander]]sqlx migrate add help text [[@cryeprecision]]try_stream!() [[@abonander]]cargo build [[@nyurik]]AtomicUsize for thread IDs [[@abonander]]v0.7.223 pull requests were merged this release cycle.
FromRow derive [[@95ulisse]]Type, Decode, and Encode for Box<str> and Box<[u8]> [[@grant0417]]remove_dir_all crate from sqlx-cli, fixes RUSTSEC-2023-0018 [[@aldur]]min_connections [[@hakoerber]]📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
4064942 to
b2e7f49
Compare
b2e7f49 to
a7c32b0
Compare
a7c32b0 to
e5b1221
Compare
e5b1221 to
6e88535
Compare
6e88535 to
09870a3
Compare
09870a3 to
cddca5d
Compare
cddca5d to
87185d7
Compare
87185d7 to
8f31569
Compare
8f31569 to
ef4d6dd
Compare
ef4d6dd to
d405b9f
Compare
d405b9f to
10298b5
Compare
10298b5 to
3b9824f
Compare
6ea6d5c to
330633e
Compare
330633e to
57e2c21
Compare
57e2c21 to
fbafd32
Compare
There was an error while loading. Please reload this page.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
fbafd32 to
22fd7aa
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.