pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sudheer H R <sudheer.hr@tekenlight.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Found a buffer-overflow defect in asynchronous database connection API PQconnectPoll
Date: Wed, 23 Jun 2021 09:24:38 -0400
Message-ID: <2080223.1624454678@sss.pgh.pa.us> (raw)
In-Reply-To: <5372B6D4-8276-42C0-B8FB-BD0918826FC3@tekenlight.com>
References: <5372B6D4-8276-42C0-B8FB-BD0918826FC3@tekenlight.com>

Sudheer H R <sudheer.hr@tekenlight.com> writes:
> While trying to sanitise the code for heap buffer overflows I compiled and linked the executable with clang -fsanitize=“address” option. The connection library indicates a buffer over flow in an internal source code of the module.

Hm, interesting.  Our code is expecting that gss_display_status() returns
a null-terminated string, but this trace suggests that the string is
not necessarily null-terminated.  The documentation I found on the net
is unclear on the point, and the code I could find is split as to how
the string is treated.  If it's not supposed to be null-terminated,
we're hardly the only ones making that mistake.

In any case, you wouldn't get here unless we'd run into some kind of
problem trying to make a GSS connection.  Could you maybe explain the
conditions you're running this under, and/or print out the failure message
it constructs?

			regards, tom lane





view thread (13+ messages)  latest in thread

Message-ID: <2080223.1624454678@sss.pgh.pa.us>
Permalink:  ../2080223.1624454678@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2080223.1624454678@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sudheer.hr@tekenlight.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Found a buffer-overflow defect in asynchronous database connection API PQconnectPoll
  In-Reply-To: <2080223.1624454678@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox