Re: BUG #18769: ldapscheme is not displayed in pg_hba_file_rules

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18769: ldapscheme is not displayed in pg_hba_file_rules
Date: 2025-01-12 15:55:56
Message-ID: 286764.1736697356@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
> I'm planning to do it today, so no need to add it. Thanks!

Our weekly Coverity run complained about this in all branches:

*** CID 181934: Memory - corruptions (OVERRUN)
/srv/coverity/git/pgsql-git/13stable/src/backend/libpq/hba.c: 2368 in gethba_options()
2362 if (hba->ldapsearchfilter)
2363 options[noptions++] =
2364 CStringGetTextDatum(psprintf("ldapsearchfilter=%s",
2365 hba->ldapsearchfilter));
2366
2367 if (hba->ldapscope)
>>> CID 181934: Memory - corruptions (OVERRUN)
>>> Overrunning array "options" of 14 8-byte elements at element index 14 (byte offset 119) using index "noptions++" (which evaluates to 14).
2368 options[noptions++] =
2369 CStringGetTextDatum(psprintf("ldapscope=%d", hba->ldapscope));
2370 }
2371
2372 if (hba->auth_method == uaRADIUS)
2373 {

Looks like you should have increased MAX_HBA_OPTIONS. The comment
just above that macro needs work too.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Gustafsson 2025-01-12 16:20:23 Re: BUG #18769: ldapscheme is not displayed in pg_hba_file_rules
Previous Message Noah Misch 2025-01-11 21:44:54 Re: BUG #17821: Assertion failed in heap_update() due to heap pruning