Re: BUG #19413: ASAN: stack-buffer-overflow in foldcase_options() with invalid ICU language tag

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: n(dot)kalinin(at)postgrespro(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19413: ASAN: stack-buffer-overflow in foldcase_options() with invalid ICU language tag
Date: 2026-05-15 16:59:39
Message-ID: c3a380772c673400279409944bd5ad4db3ecebe2.camel@j-davis.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 2026-02-19 at 05:26 +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference:      19413
> Logged by:          Nikita Kalinin
> Email address:      n(dot)kalinin(at)postgrespro(dot)ru
> PostgreSQL version: 18.2
> Operating system:   ubuntu 22.04
> Description:       
>
> When building with ASAN:
> CPPFLAGS="-O0 -ggdb3 -fno-omit-frame-pointer -fsanitize=address
> -fsanitize=undefined -fno-sanitize-recover=all
> -fno-sanitize=nonnull-attribute -fstack-protector"
> LDFLAGS="-fsanitize=address -fsanitize=undefined"
>
> Runtime ASAN options:
> ASAN_OPTIONS=detect_leaks=0:abort_on_error=1:disable_coredump=0:stric
> t_string_checks=1:check_initialization_order=1:strict_init_order=1:de
> tct_odr_violation=0:detect_stack_use_after_return=0
>
> The following queries:
> CREATE COLLATION lt_insensitive (provider = icu, locale = 'enu-ks-
> level1',
> deterministic = false);
> CREATE COLLATION lt_insensitive (provider = icu, locale = 'en-u-ks-
> level1',
> deterministic = false);
> CREATE COLLATION x (provider = icu, locale = 'en-u-ks-level1',
> deterministic
> = false);
> CREATE COLLATION lt_insensitive (provider = icu, locale = 'en-u-ks-
> level1',
> deterministic = false);

Thank you for the report. This appears to be fixed as of:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=06ce97b9994eca91250d7c28f0df9b1ae7829f36

due to another report that came later. This bug should have been
referenced in the commit -- sorry.

Let me know if this resolves the issue.

Regards,
Jeff Davis

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Japin Li 2026-05-16 01:24:15 Re: BUG #19478: `dblink_close` can be used for injection.
Previous Message PG Bug reporting form 2026-05-15 11:11:37 BUG #19480: PL/Python SRF crashes (SIGSEGV) when function is replaced mid-iteration: use-after-free in PLy_funct