Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
quietsy
aports
Commits
a751b31b
Commit
a751b31b
authored
12 years ago
by
Natanael Copa
Browse files
Options
Downloads
Patches
Plain Diff
main/openldap: security fix (CVE-2012-1164)
fixes #1320
parent
4d1843c3
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/openldap/APKBUILD
+3
-1
3 additions, 1 deletion
main/openldap/APKBUILD
main/openldap/openldap-cve-assertion-processing-search-queries.patch
+52
-0
52 additions, 0 deletions
...ap/openldap-cve-assertion-processing-search-queries.patch
with
55 additions
and
1 deletion
main/openldap/APKBUILD
+
3
−
1
View file @
a751b31b
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname
=
openldap
pkgver
=
2.4.24
pkgrel
=
1
pkgrel
=
2
pkgdesc
=
"LDAP Server"
url
=
"http://www.openldap.org/"
license
=
"custom"
...
...
@@ -17,6 +17,7 @@ source="ftp://ftp.$pkgname.org/pub/OpenLDAP/$pkgname-release/$pkgname-$pkgver.tg
openldap-2.4-ppolicy.patch
openldap-2.4.11-libldap_r.patch
cve-2011-4079.patch
openldap-cve-assertion-processing-search-queries.patch
slapd.initd
slapd.confd
slurpd.initd
...
...
@@ -99,6 +100,7 @@ md5sums="116fe1e23a7b67686d5e62274367e6c0 openldap-2.4.24.tgz
2524e490ba334a760fa57057c16da7a9 openldap-2.4-ppolicy.patch
d19d0502f046078ecd737e29e7552fa8 openldap-2.4.11-libldap_r.patch
967d86fbfdbf9054b722f23323751fc9 cve-2011-4079.patch
4f71dd299204ab338c33a17594934466 openldap-cve-assertion-processing-search-queries.patch
a729bf553d12b4a9fbda0ff5202a0443 slapd.initd
b672311fca605c398240cd37a2ae080a slapd.confd
fa5ce0005ef5f1160b6ff126f97aaa1a slurpd.initd"
This diff is collapsed.
Click to expand it.
main/openldap/openldap-cve-assertion-processing-search-queries.patch
0 → 100644
+
52
−
0
View file @
a751b31b
Assertion failure by processing search queries requesting only attributes for particular entry
Upstream ITS: #7143
Upstream commit: ef2f526 430256f 463c1fa
Resolves: #802514 (CVE-2012-1164)
diff --git a/servers/slapd/attr.c b/servers/slapd/attr.c
index 51f5075..bfc717c 100644
--- a/servers/slapd/attr.c
+++ b/servers/slapd/attr.c
@@ -232,13 +232,16 @@
attr_dup2( Attribute *tmp, Attribute *a )
if ( a->a_nvals != a->a_vals ) {
tmp->a_nvals = ch_malloc( (tmp->a_numvals + 1) * sizeof(struct berval) );
- for ( j = 0; !BER_BVISNULL( &a->a_nvals[j] ); j++ ) {
- assert( j < i );
- ber_dupbv( &tmp->a_nvals[j], &a->a_nvals[j] );
- if ( BER_BVISNULL( &tmp->a_nvals[j] ) ) break;
- /* FIXME: error? */
+ j = 0;
+ if ( i ) {
+ for ( ; !BER_BVISNULL( &a->a_nvals[j] ); j++ ) {
+ assert( j < i );
+ ber_dupbv( &tmp->a_nvals[j], &a->a_nvals[j] );
+ if ( BER_BVISNULL( &tmp->a_nvals[j] ) ) break;
+ /* FIXME: error? */
+ }
+ assert( j == i );
}
- assert( j == i );
BER_BVZERO( &tmp->a_nvals[j] );
} else {
diff --git a/servers/slapd/overlays/rwm.c b/servers/slapd/overlays/rwm.c
index c724be2..0c78e80 100644
--- a/servers/slapd/overlays/rwm.c
+++ b/servers/slapd/overlays/rwm.c
@@ -1276,7 +1276,13 @@
rwm_attrs( Operation *op, SlapReply *rs, Attribute** a_first, int stripEntryDN )
NULL );
if ( rc != LDAP_SUCCESS ) {
- BER_BVZERO( &(*ap)->a_nvals[i] );
+ /* FIXME: this is wrong, putting a non-normalized value
+ * into nvals. But when a proxy sends us bogus data,
+ * we still need to give it to the client, even if it
+ * violates the syntax. I.e., we don't want to silently
+ * drop things and trigger an apparent data loss.
+ */
+ ber_dupbv( &(*ap)->a_nvals[i], &(*ap)->a_vals[i] );
}
}
BER_BVZERO( &(*ap)->a_nvals[i] );
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment