The Samba-Bugzilla – Attachment 15323 Details for
Bug 14049
ldb dn crash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proof of concept crasher
0001-ldb-dn-crash-test-case.patch (text/plain), 2.26 KB, created by
Douglas Bagnall
on 2019-07-25 01:18:16 UTC
(
hide
)
Description:
proof of concept crasher
Filename:
MIME Type:
Creator:
Douglas Bagnall
Created:
2019-07-25 01:18:16 UTC
Size:
2.26 KB
patch
obsolete
>From 4cd389f2fb76b2bddc58ed080d754f7934b21a13 Mon Sep 17 00:00:00 2001 >From: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >Date: Thu, 25 Jul 2019 12:20:45 +1200 >Subject: [PATCH] ldb dn crash test case > >--- > lib/ldb/tests/ldb_dn_crash.c | 33 +++++++++++++++++++++++++++++++++ > lib/ldb/wscript | 5 +++++ > 2 files changed, 38 insertions(+) > create mode 100644 lib/ldb/tests/ldb_dn_crash.c > >diff --git a/lib/ldb/tests/ldb_dn_crash.c b/lib/ldb/tests/ldb_dn_crash.c >new file mode 100644 >index 00000000000..e5b7eeddd45 >--- /dev/null >+++ b/lib/ldb/tests/ldb_dn_crash.c >@@ -0,0 +1,33 @@ >+/* >+ * Unix SMB/CIFS implementation. >+ * >+ * Copyright (C) 2018 Andreas Schneider <asn@samba.org> >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+ * the Free Software Foundation; either version 3 of the License, or >+ * (at your option) any later version. >+ * >+ * This program is distributed in the hope that it will be useful, >+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+ * GNU General Public License for more details. >+ * >+ * You should have received a copy of the GNU General Public License >+ * along with this program. If not, see <http://www.gnu.org/licenses/>. >+ */ >+ >+#include <ldb.h> >+ >+int main(void) { >+ const char *s; >+ struct ldb_context *ldb = ldb_init(NULL, NULL); >+ struct ldb_dn *dn = ldb_dn_new(ldb, ldb, "<"); >+ int result = ldb_dn_validate(dn); >+ if (result == false) { >+ printf("GOOD, we failed!\n"); >+ return 0; >+ } >+ s = ldb_dn_canonical_string(ldb, dn); >+ printf("apparent success: %s\n", s); >+} >diff --git a/lib/ldb/wscript b/lib/ldb/wscript >index ea53c60b15b..fdb9b23de6d 100644 >--- a/lib/ldb/wscript >+++ b/lib/ldb/wscript >@@ -497,6 +497,11 @@ def build(bld): > deps='cmocka ldb', > install=False) > >+ bld.SAMBA_BINARY('ldb_dn_crash', >+ source='tests/ldb_dn_crash.c', >+ deps='ldb', >+ install=False) >+ > bld.SAMBA_BINARY('ldb_match_test', > source='tests/ldb_match_test.c', > deps='cmocka ldb', >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14049
: 15323 |
15327
|
15328
|
15330
|
15378
|
15403