- Dec 27, 2015
-
-
Alvaro Herrera authored
Both Blowfish and DES implementations of crypt() can take arbitrarily long time, depending on the number of rounds specified by the caller; make sure they can be interrupted. Author: Andreas Karlsson Reviewer: Jeff Janes Backpatch to 9.1.
-
- Oct 12, 2015
-
-
Noah Misch authored
Josh Kupershmidt
-
- Oct 05, 2015
-
-
Noah Misch authored
Certain short salts crashed the backend or disclosed a few bytes of backend memory. For existing salt-induced error conditions, emit a message saying as much. Back-patch to 9.0 (all supported versions). Josh Kupershmidt Security: CVE-2015-5288
-
- Jan 24, 2015
-
-
Tom Lane authored
strncpy() has a well-deserved reputation for being unsafe, so make an effort to get rid of nearly all occurrences in HEAD. A large fraction of the remaining uses were passing length less than or equal to the known strlen() of the source, in which case no null-padding can occur and the behavior is equivalent to memcpy(), though doubtless slower and certainly harder to reason about. So just use memcpy() in these cases. In other cases, use either StrNCpy() or strlcpy() as appropriate (depending on whether padding to the full length of the destination buffer seems useful). I left a few strncpy() calls alone in the src/timezone/ code, to keep it in sync with upstream (the IANA tzcode distribution). There are also a few such calls in ecpg that could possibly do with more analysis. AFAICT, none of these changes are more than cosmetic, except for the four occurrences in fe-secure-openssl.c, which are in fact buggy: an overlength source leads to a non-null-terminated destination buffer and ensuing misbehavior. These don't seem like security issues, first because no stack clobber is possible and second because if your values of sslcert etc are coming from untrusted sources then you've got problems way worse than this. Still, it's undesirable to have unpredictable behavior for overlength inputs, so back-patch those four changes to all active branches.
-
- May 06, 2014
-
-
Bruce Momjian authored
This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching.
-
- May 30, 2012
-
-
Tom Lane authored
Overly tight coding caused the password transformation loop to stop examining input once it had processed a byte equal to 0x80. Thus, if the given password string contained such a byte (which is possible though not highly likely in UTF8, and perhaps also in other non-ASCII encodings), all subsequent characters would not contribute to the hash, making the password much weaker than it appears on the surface. This would only affect cases where applications used DES crypt() to encode passwords before storing them in the database. If a weak password has been created in this fashion, the hash will stop matching after this update has been applied, so it will be easy to tell if any passwords were unexpectedly weak. Changing to a different password would be a good idea in such a case. (Since DES has been considered inadequately secure for some time, changing to a different encryption algorithm can also be recommended.) This code, and the bug, are shared with at least PHP, FreeBSD, and OpenBSD. Since the other projects have already published their fixes, there is no point in trying to keep this commit private. This bug has been assigned CVE-2012-2143, and credit for its discovery goes to Rubin Xu and Joseph Bonneau.
-
- Apr 24, 2012
-
-
Robert Haas authored
Josh Kupershmidt
-
- Sep 11, 2011
-
-
Peter Eisentraut authored
This addresses only those cases that are easy to fix by adding or moving a const qualifier or removing an unnecessary cast. There are many more complicated cases remaining.
-
- Sep 01, 2011
-
-
Bruce Momjian authored
-
- Sep 20, 2010
-
-
Magnus Hagander authored
-
- Jul 13, 2006
-
-
Neil Conway authored
Few cleanups and couple of new things: - add SHA2 algorithm to older OpenSSL - add BIGNUM math to have public-key cryptography work on non-OpenSSL build. - gen_random_bytes() function The status of SHA2 algoritms and public-key encryption can now be changed to 'always available.' That makes pgcrypto functionally complete and unless there will be new editions of AES, SHA2 or OpenPGP standards, there is no major changes planned.
-
- Mar 11, 2006
-
-
Bruce Momjian authored
-
- Oct 15, 2005
-
-
Bruce Momjian authored
-
- Sep 24, 2005
-
-
Tom Lane authored
-
- Oct 25, 2004
-
-
Tom Lane authored
writing 'foo()' rather than 'foo(void)'.
-
- May 14, 2003
-
-
Tom Lane authored
Includes fixes from Joe Conway.
-
- Nov 30, 2001
-
-
Bruce Momjian authored
everywhere. At least it was now detected correctly. marko
-
- Nov 29, 2001
-
-
Bruce Momjian authored
produces garbage. I learned the hard way that #if UNDEFINED_1 == UNDEFINED_2 #error "gcc is idiot" #endif prints "gcc is idiot" ... Affected are MD5/SHA1 in internal library, and also HMAC-MD5/HMAC-SHA1/ crypt-md5 which use them. Blowfish is ok, also Rijndael on at least x86. Big thanks to Daniel Holtzman who send me a build log which contained warning: md5.c:246: warning: `X' defined but not used Yes, gcc is that helpful... Please apply this. -- marko
-
- Nov 20, 2001
-
-
Bruce Momjian authored
needs it. Seems it is getting compileable... Marko Kreen
-
- Nov 05, 2001
-
-
Bruce Momjian authored
initdb/regression tests pass.
-
- Oct 30, 2001
-
-
Bruce Momjian authored
-
- Oct 28, 2001
-
-
Bruce Momjian authored
spacing. Also adds space for one-line comments.
-
- Oct 25, 2001
-
-
Bruce Momjian authored
tests pass.
-
- Oct 15, 2001
-
-
Tom Lane authored
-
- Aug 21, 2001
-
-
Bruce Momjian authored
-