Re: Found a buffer-overflow defect in asynchronous database connection API PQconnectPoll - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Found a buffer-overflow defect in asynchronous database connection API PQconnectPoll
Date
Msg-id 2080223.1624454678@sss.pgh.pa.us
Whole thread Raw
In response to Found a buffer-overflow defect in asynchronous database connection API PQconnectPoll  (Sudheer H R <sudheer.hr@tekenlight.com>)
Responses Re: Found a buffer-overflow defect in asynchronous database connection API PQconnectPoll  (Sudheer H R <sudheer.hr@tekenlight.com>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17071: ORDER BY gets ignored when result set has only one row, but another one gets added by rollup()
Next
From: Sudheer H R
Date:
Subject: Re: Found a buffer-overflow defect in asynchronous database connection API PQconnectPoll