Re: BUG #19527: Double-Abort Crash in `ResOwnerReleaseOSSLCipher` via `encrypt_iv` with Oversized Input - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19527: Double-Abort Crash in `ResOwnerReleaseOSSLCipher` via `encrypt_iv` with Oversized Input
Date
Msg-id 484822.1782146253@sss.pgh.pa.us
Whole thread
In response to BUG #19527: Double-Abort Crash in `ResOwnerReleaseOSSLCipher` via `encrypt_iv` with Oversized Input  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> Any role with `EXECUTE` on `encrypt_iv` (granted by default when pgcrypto is
> installed) can crash the backend with a single statement:

> ```sql
> CREATE EXTENSION IF NOT EXISTS pgcrypto;
> SELECT encrypt_iv(
>     repeat('A', 1073741308)::bytea,
>     decode('00112233445566778899aabbccddeeff', 'hex'),
>     decode('000102030405060708090a0b0c0d0e0f', 'hex'),
>     'aes'
> );
> ```

> The fix is to clear `od->owner` before calling `free_openssl_cipher` in
> `ResOwnerReleaseOSSLCipher`:

Good catch, thanks for the report!

            regards, tom lane



pgsql-bugs by date:

Previous
From: "Matheus Alcantara"
Date:
Subject: Re: BUG #19480: PL/Python SRF crashes (SIGSEGV) when function is replaced mid-iteration: use-after-free in PLy_funct
Next
From: Laurenz Albe
Date:
Subject: Re: BUG #19483: pg_upgrade fails with orphan records in pg_init_priv catalog table