Merge ~ahasenack/ubuntu/+source/libapache2-mod-auth-pgsql:artful-mod-auth-pgsql-null-check-1698758 into ~usd-import-team/ubuntu/+source/libapache2-mod-auth-pgsql:ubuntu/devel

Proposed by Andreas Hasenack on 2017-06-22
Status: Merged
Merge reported by: Robie Basak
Merged at revision: 7857ad957ca2fc9084d310d109e37de2e19c79b5
Proposed branch: ~ahasenack/ubuntu/+source/libapache2-mod-auth-pgsql:artful-mod-auth-pgsql-null-check-1698758
Merge into: ~usd-import-team/ubuntu/+source/libapache2-mod-auth-pgsql:ubuntu/devel
Diff against target: 67 lines (+35/-1)
4 files modified
debian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/crypt-check-null-1698758.patch (+25/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
LocutusOfBorg (community) Approve on 2017-07-13
Canonical Server Team 2017-06-22 Pending
Review via email: mp+326173@code.launchpad.net

Description of the Change

Check for a NULL return from crypt(3)

crypt(3) will return NULL in the case of errors, like if an unsupported hash algorithm is used, or incorrect salt options are passed.

NOTE: this was just sponsored by LocutusOfBorg and uploaded to artful

To post a comment you must log in.
41b5169... by Andreas Hasenack on 2017-07-13

Updated DEP3 header with forwarded info and a small syntax fix.

7857ad9... by Andreas Hasenack on 2017-07-13

update-maintainer

uploaded

review: Approve

with a little change in maintainer and dep3 header patch

Robie Basak (racb) wrote :

Upload tag upload/2.0.3-6.1ubuntu1 pushed; tree matches existing tag pkg import/2.0.3-6.1ubuntu1.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 5156bbc..ac7f61b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+libapache2-mod-auth-pgsql (2.0.3-6.1ubuntu1) artful; urgency=medium
7+
8+ * d/p/crypt-check-null-1698758.patch: check for a NULL return from crypt(3)
9+ (LP: #1698758)
10+
11+ -- Andreas Hasenack <andreas@canonical.com> Thu, 22 Jun 2017 14:34:03 -0300
12+
13 libapache2-mod-auth-pgsql (2.0.3-6.1) unstable; urgency=medium
14
15 * Non-maintainer upload.
16diff --git a/debian/control b/debian/control
17index 0882707..2187ec0 100644
18--- a/debian/control
19+++ b/debian/control
20@@ -1,5 +1,6 @@
21 Source: libapache2-mod-auth-pgsql
22-Maintainer: Marco Nenciarini <mnencia@debian.org>
23+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
24+XSBC-Original-Maintainer: Marco Nenciarini <mnencia@debian.org>
25 Section: httpd
26 Priority: extra
27 Standards-Version: 3.9.4
28diff --git a/debian/patches/crypt-check-null-1698758.patch b/debian/patches/crypt-check-null-1698758.patch
29new file mode 100644
30index 0000000..012a77a
31--- /dev/null
32+++ b/debian/patches/crypt-check-null-1698758.patch
33@@ -0,0 +1,25 @@
34+Description: check for a NULL return from crypt(3)
35+ crypt(3) will return NULL in the case of errors, like if an
36+ unsupported hash algorithm is used, or incorrect salt options
37+ are passed.
38+Author: Andreas Hasenack <andreas@canonical.com>
39+Bug-Debian: https://bugs.debian.org/865553
40+Bug-Ubuntu: https://launchpad.net/bugs/1698758
41+Forwarded: yes (emailed Giuseppe Tanzilli <info@giuseppetanzilli.it>)
42+Last-Update: 2017-07-13
43+
44+--- libapache2-mod-auth-pgsql-2.0.3.orig/mod_auth_pgsql.c
45++++ libapache2-mod-auth-pgsql-2.0.3/mod_auth_pgsql.c
46+@@ -868,6 +868,12 @@ static authn_status check_password(reque
47+ break;
48+ case AUTH_PG_HASH_TYPE_CRYPT:
49+ sent_pw = (char *) crypt(sent_pw, real_pw);
50++ if (!sent_pw) {
51++ apr_snprintf(pg_errstr, MAX_STRING_LEN,
52++ "PG user %s: unsupported CRYPT format", user);
53++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "[mod_auth_pgsql.c] - ERROR - %s", pg_errstr);
54++ return AUTH_DENIED;
55++ }
56+ break;
57+ case AUTH_PG_HASH_TYPE_BASE64:
58+ sent_pw = auth_pg_base64(sent_pw);
59diff --git a/debian/patches/series b/debian/patches/series
60index 5eff60a..0746b9a 100644
61--- a/debian/patches/series
62+++ b/debian/patches/series
63@@ -3,3 +3,4 @@ documentation.patch
64 encoding.patch
65 apache-2.4.patch
66 fixdoublefree.patch
67+crypt-check-null-1698758.patch

Subscribers

People subscribed via source and target branches