Package: release.debian.org Severity: normal Tags: jessie User: release.debian....@packages.debian.org Usertags: pu
Dear SRM, I would like to fix #806909 in jessie. It has been reported by different people upstream, in Ubuntu, and now in Debian as well, so the impact seems to be at least moderately widespread. The fix originates upstream and has been in testing since July. The patch changes a macro in a public header. I used codesearch.d.n to check the archive for possible users of the macro that would need to be rebuilt. The only packages I found actually using the libldap version of it are 389-ds-base and 389-dsgw, however these appear to not actually be affected, due to internal confusion in the API: they end up allocating enough memory to wrap text at 76 columns (actually 77, because of the bug), while actually wrapping it at 78, and this difference is enough to avoid any overflow according to my testing. -- System Information: Debian Release: 8.2 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff -u openldap-2.4.40+dfsg/debian/changelog openldap-2.4.40+dfsg/debian/changelog --- openldap-2.4.40+dfsg/debian/changelog +++ openldap-2.4.40+dfsg/debian/changelog @@ -1,3 +1,11 @@ +openldap (2.4.40+dfsg-1+deb8u2) jessie; urgency=medium + + * debian/patches/ITS8003-fix-off-by-one-in-LDIF-length.patch: Import + upstream patch to fix a crash when adding a large attribute value with the + auditlog overlay enabled. (Closes: #806909) + + -- Ryan Tandy <r...@nardis.ca> Sat, 12 Dec 2015 16:11:38 -0800 + openldap (2.4.40+dfsg-1+deb8u1) jessie-security; urgency=high * Non-maintainer upload by the Security Team. diff -u openldap-2.4.40+dfsg/debian/patches/series openldap-2.4.40+dfsg/debian/patches/series --- openldap-2.4.40+dfsg/debian/patches/series +++ openldap-2.4.40+dfsg/debian/patches/series @@ -27,0 +28 @@ +ITS8003-fix-off-by-one-in-LDIF-length.patch only in patch2: unchanged: --- openldap-2.4.40+dfsg.orig/debian/patches/ITS8003-fix-off-by-one-in-LDIF-length.patch +++ openldap-2.4.40+dfsg/debian/patches/ITS8003-fix-off-by-one-in-LDIF-length.patch @@ -0,0 +1,33 @@ +From c8353f7acdec4a42f537b0d475aaae005ba72363 Mon Sep 17 00:00:00 2001 +From: Howard Chu <h...@openldap.org> +Date: Mon, 15 Dec 2014 14:36:55 +0000 +Subject: [PATCH] ITS#8003 fix off-by-one in LDIF length + +must account for leading space when counting total number of lines +--- + include/ldif.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/ldif.h b/include/ldif.h +index f638ef9..69bb0c9 100644 +--- a/include/ldif.h ++++ b/include/ldif.h +@@ -52,12 +52,12 @@ LDAP_LDIF_V (int) ldif_debug; + */ + #define LDIF_SIZE_NEEDED(nlen,vlen) \ + ((nlen) + 4 + LDIF_BASE64_LEN(vlen) \ +- + ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / LDIF_LINE_WIDTH * 2 )) ++ + ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / (LDIF_LINE_WIDTH-1) * 2 )) + + #define LDIF_SIZE_NEEDED_WRAP(nlen,vlen,wrap) \ + ((nlen) + 4 + LDIF_BASE64_LEN(vlen) \ +- + ((wrap) == 0 ? ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / ( LDIF_LINE_WIDTH ) * 2 ) : \ +- ((wrap) == LDIF_LINE_WIDTH_MAX ? 0 : ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / (wrap) * 2 )))) ++ + ((wrap) == 0 ? ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / ( LDIF_LINE_WIDTH-1 ) * 2 ) : \ ++ ((wrap) == LDIF_LINE_WIDTH_MAX ? 0 : ((LDIF_BASE64_LEN(vlen) + (nlen) + 3) / (wrap-1) * 2 )))) + + LDAP_LDIF_F( int ) + ldif_parse_line LDAP_P(( +-- +2.1.4 +